java调用weka包报错问题

 

 

问题1:

报错:java.lang.IllegalArgumentException:Comparison method violates its general contral!

方法:yes,Java 1.7 is a bitmore strict about custom sorts.put this additional parameter into your JAVA_OPTS:

        -Djava.util.Arrays.useLegacyMergeSort=true

 

问题2:

报错:java.lang.IllegalArgumentException:A norminal attribute cannot have duplicate labels('(0.0000d-0.00005]').

方法:weka只能处理6位小数之内的,超过了的都当做0处理,改变相应特征的scale(放大倍数)是解决办法。

weka saves numbrs only with at most 6 digits after the decimal point.if the Discretize filter(which is used internally)produces bins with numbers that

are smaller than 10E-6 than this exception will be thrown.scaling that attribute as preprocessing step should help.

posted @ 2017-03-02 17:05  跳出  阅读(321)  评论(0编辑  收藏  举报