有没有办法从 WEKA 加载实例对象而不需要很长的加载时间?
当我使用 weka.core.converters.CSVLoader 加载 .csv 文件时,weka 尝试加载一堆我不需要的东西(例如加载数据库驱动程序 - 见下文)。 我只需要尽快获得 Instances 对象,这样我就可以用它做一些操作。
有没有一种方法可以快速加载对象,而无需所有不必要的开销?
Weka 的新版本甚至更慢(加载了更多内容)。
谢谢, 托德
---Registering Weka Editors---
Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.gjt.mm.mysql.Driver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Warning, not in CLASSPATH?
When I load a .csv file with weka.core.converters.CSVLoader, weka tries to load a bunch of stuff I dont need (like load database drivers- see below).
I just need the Instances object as quickly as possible so I can do some operations with it.
Is there a way to quickly load the object without all the unnecessary overhead?
Newer versions of Weka are even slower (with more stuff loaded).
Thanks,
Todd
---Registering Weka Editors---
Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.gjt.mm.mysql.Driver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Warning, not in CLASSPATH?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我认为如果您关心性能,您应该使用 Weka API 从 Java 程序运行实验,而不是从 GUI 或命令行运行。
但无论如何,您可以采取一些措施来最大程度地减少 Weka 在初始化时加载的内容:
1- 从文件夹
%USER_DIR%\wekafiles\packages
中删除您不需要的内容,因为 Weka 会加载这些文件 2-在Weka 源代码中更改文件
weka.experiment.DatabaseUtils.props
并注释以下行,这将限制 Weka 所使用的数据库驱动程序负载。一般来说,您可以搜索Weka在初始化期间在控制台上显示的消息,例如“加载属性和插件”,并在Weka源代码中搜索它,看看您可以安全地禁用哪些内容。
Well I think if you care about the performance you should run you experiment from a Java program using Weka API not from GUI or Command Line.
But anyways, there are few things you can do to minimize what Weka loads in the initializing:
1- Remove what you do not need from the folder
%USER_DIR%\wekafiles\packages
, because Weka load these files when it starts2- Within Weka source code change the file
weka.experiment.DatabaseUtils.props
and comment the below line which will limit the database drivers that Weka loads.In general, you can search for the message that Weka displays on the console during the initialization e.g.
"Loading properties and plugins"
and search for it in Weka source code and see what you can safely disable.