有没有办法从 WEKA 加载实例对象而不需要很长的加载时间?

发布于 2025-01-06 18:07:56 字数 724 浏览 0 评论 0原文

当我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

‘画卷フ 2025-01-13 18:07:56

好吧,我认为如果您关心性能,您应该使用 Weka API 从 Java 程序运行实验,而不是从 GUI 或命令行运行。

但无论如何,您可以采取一些措施来最大程度地减少 Weka 在初始化时加载的内容:

1- 从文件夹 %USER_DIR%\wekafiles\packages 中删除您不需要的内容,因为 Weka 会加载这些文件 2-在

Weka 源代码中更改文件 weka.experiment.DatabaseUtils.props 并注释以下行,这将限制 Weka 所使用的数据库驱动程序负载。

#jdbcDriver=RmiJdbc.RJDriver,jdbc.idbDriver,org.gjt.mm.mysql.Driver,com.mckoi.JDBCDriver,org.hsqldb.jdbcDriver

一般来说,您可以搜索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 starts

2- 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.

#jdbcDriver=RmiJdbc.RJDriver,jdbc.idbDriver,org.gjt.mm.mysql.Driver,com.mckoi.JDBCDriver,org.hsqldb.jdbcDriver

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文