1.参数设置(这两个参数我不怎么清楚什么意思,查了半天也没查到,有谁知道的务必不吝指教!!)
-K -- Use a kernel density estimator for numeric attributes rather than a normal distribution.对数值属性使用核密度估计代替正态分布
-D -- Use
supervised discretization to convert numeric attributes to nominal
ones.
这两者只能2选一
2.一开始加载arff文件是报错
原来是文件中属性有重名的,修改一下即可。
3.如果直接运行的话会因为内存不够而产生异常(数据量太大)
Exception in thread "main"
java.lang.OutOfMemoryError: Java heap space
at weka.core.Instances.sort(Instances.java:1231)
at weka.core.Instances.sort(Instances.java:1251)
at
weka.classifiers.bayes.NaiveBayes.buildClassifier(NaiveBayes.java:247)
at pers.NaiveBayesTest.main(NaiveBayesTest.java:37)
soluti