码迷,mamicode.com
首页 > 其他好文 > 详细

weka

时间:2014-07-17 22:19:19      阅读:332      评论:0      收藏:0      [点我收藏+]

标签:for   re   c   new   ar   amp   

// remove instances with missing class
Instances newData = new Instances(data);
newData.deleteWithMissingClass();
m_structure = new Instances(newData, 0);

m_Random = new Random(getSeed());

if (m_classifiersToLoad.size() > 0) {
m_preBuiltClassifiers.clear();
loadClassifiers(data);

if (m_Classifiers.length == 1
&& m_Classifiers[0] instanceof weka.classifiers.rules.ZeroR) {
// remove the single ZeroR
m_Classifiers = new Classifier[0];
}
}

Classifier [] Classifiers = new Classifier[3];

//m_Classifiers[0]=new LibSVM();
Classifiers[0]=new J48();
Classifiers[1]=new Logistic();
Classifiers[2]=new SMO();

m_Classifiers=Classifiers;
// can classifier handle the data?
getCapabilities().testWithFail(data);

for (int i = 0; i < m_Classifiers.length; i++) {
getClassifier(i).buildClassifier(newData);
}

weka,布布扣,bubuko.com

weka

标签:for   re   c   new   ar   amp   

原文地址:http://www.cnblogs.com/GuoJiaSheng/p/3851755.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!