Weka 3.8.1 can't link to mtj.jar, causing java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix

点点圈 提交于 2019-12-01 22:06:56

问题


I'm processing the some data in weka, and I want to use weka API so that I can use my self-defined algorithms. However, when I just want to instantiate the LinearRegression class: LinearRegression myRegression = new LinearRegression() I got the same error as: This person got the same problem and he roll back to version 3.6.12 I checked my weka.jar and I can find mtj.jar is included, so I'm sure there must be somewhere linked inapproriately. Downgrade the API version is not the best option for me because I want to use new class RegressionAnalysis. Any help thanks.


回答1:


My current solution is a hack, I downloaded mtj.jar and added this .jar lib to my external lib. This hack will resolve:

java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix

However, this hack has a flaw that it will bring up a warning:

WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS

Update:

Same solution could apply to get rid of the warning as well.



来源:https://stackoverflow.com/questions/42379864/weka-3-8-1-cant-link-to-mtj-jar-causing-java-lang-classnotfoundexception-no-u

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!