欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

在weka中配置自己的算法 zz

发布时间:2025/3/21 编程问答 49 豆豆
生活随笔 收集整理的这篇文章主要介绍了 在weka中配置自己的算法 zz 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

http://liouwei20051000285.blog.163.com/blog/static/2523674201052394826984/

1 在weka中新建一个包,比如建立 报名为"weka.classifiers.myalgorithm"的包.

2 在"weka.classifiers.myalgorithm"包中写好自己的代码,这里方便起见,我直接在"weka.classifiers.trees"包下复制ID3算法的java文件添加到"weka.classifiers.myalgorithm"包中.然后改名字为"MyId3"

3 修改"weka.gui"包下的两个两个配置文件"GenericPropertiesCreator.props"与"GenericObjectEditor.props"

4 在文件"GenericPropertiesCreator.props"中找到"# Lists the Classifiers-Packages I want to choose from"这一项,然后在" weka.classifiers.rules"上一行新增"weka.classifiers.myalgorithm,/"最后保存设置.

5 在文件"GenericObjectEditor.props"中找到"# Lists the Classifiers I want to choose from"这一项,然后在" weka.classifiers.rules.ZeroR"上一行新增" weka.classifiers.myalgorithm.MyId3,/"最后保存设置.

 

 

在此之前, 我在网上找到spectral clustering的java code for weka, 已经成功加入到weka中。 但是类的extends, implements似乎有点问题, 无法正常使用spectral clustering

总结

以上是生活随笔为你收集整理的在weka中配置自己的算法 zz的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。