当前位置: 首页>>代码示例>>Java>>正文


Java SMO.setBuildLogisticModels方法代码示例

本文整理汇总了Java中weka.classifiers.functions.SMO.setBuildLogisticModels方法的典型用法代码示例。如果您正苦于以下问题:Java SMO.setBuildLogisticModels方法的具体用法?Java SMO.setBuildLogisticModels怎么用?Java SMO.setBuildLogisticModels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在weka.classifiers.functions.SMO的用法示例。


在下文中一共展示了SMO.setBuildLogisticModels方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testDeepML

import weka.classifiers.functions.SMO; //导入方法依赖的package包/类
public void testDeepML() {
	System.out.println("Test Stacked Boltzmann Machines with an off-the-shelf multi-label classifier");
	DeepML dbn = new DeepML();

	MCC h = new MCC();
	SMO smo = new SMO();
	smo.setBuildLogisticModels(true);
	h.setClassifier(smo);

	dbn.setClassifier(h);
	dbn.setE(100);
	dbn.setH(30);

	Result r = EvaluationTests.cvEvaluateClassifier(dbn);
	System.out.println("DeepML + MCC" + r.info.get("Accuracy"));
	String s = r.info.get("Accuracy");
	assertTrue("DeepML+MCC Accuracy Correct", s.startsWith("0.53")); // Good enough 
}
 
开发者ID:IsaacHaze,项目名称:meka,代码行数:19,代码来源:DeepMethodsTests.java

示例2: testMCC

import weka.classifiers.functions.SMO; //导入方法依赖的package包/类
public void testMCC() {
	// Test MCC (with SMO -- -M)
	System.out.println("Test MCC");
	MCC h = new MCC();
	SMO smo = new SMO();
	smo.setBuildLogisticModels(true);
	h.setClassifier(smo);
	Result r = EvaluationTests.cvEvaluateClassifier(h);
	assertTrue("MCC Accuracy Correct", r.info.get("Accuracy").equals("0.561 +/- 0.035") );
}
 
开发者ID:IsaacHaze,项目名称:meka,代码行数:11,代码来源:CCMethodsTests.java

示例3: testPMCC

import weka.classifiers.functions.SMO; //导入方法依赖的package包/类
public void testPMCC() {
	// Test MCC (with SMO -- -M)
	System.out.println("Test PMCC");
	PMCC h = new PMCC();
	h.setM(10);
	h.setChainIterations(50);
	h.setInferenceInterations(20);
	SMO smo = new SMO();
	smo.setBuildLogisticModels(true);
	h.setClassifier(smo);
	Result r = EvaluationTests.cvEvaluateClassifier(h);
	assertTrue("PMCC Accuracy Correct", r.info.get("Accuracy").equals("0.587 +/- 0.035") );
}
 
开发者ID:IsaacHaze,项目名称:meka,代码行数:14,代码来源:CCMethodsTests.java

示例4: testPCC

import weka.classifiers.functions.SMO; //导入方法依赖的package包/类
public void testPCC() {
	// Test PCC (with SMO -- -M)
	System.out.println("Test PCC");
	PCC h = new PCC();
	SMO smo = new SMO();
	smo.setBuildLogisticModels(true);
	h.setClassifier(smo);
	Result r = EvaluationTests.cvEvaluateClassifier(h);
	assertTrue("PCC Accuracy Correct", r.info.get("Accuracy").equals("0.565 +/- 0.032") );
}
 
开发者ID:IsaacHaze,项目名称:meka,代码行数:11,代码来源:CCMethodsTests.java

示例5: testCT

import weka.classifiers.functions.SMO; //导入方法依赖的package包/类
public void testCT() {
	// Test CT (with SMO -- -M)
	System.out.println("Test CT");
	CT h = new CT();
	SMO smo = new SMO();
	smo.setBuildLogisticModels(true);
	h.setClassifier(smo);
	h.setInferenceInterations(10);
	h.setChainIterations(10);
	Result r = EvaluationTests.cvEvaluateClassifier(h);
	//System.out.println("CT ACC: "+r.info.get("Accuracy"));
	assertTrue("CT Accuracy Correct", r.info.get("Accuracy").equals("0.56  +/- 0.034") );
}
 
开发者ID:IsaacHaze,项目名称:meka,代码行数:14,代码来源:CCMethodsTests.java

示例6: testCDT

import weka.classifiers.functions.SMO; //导入方法依赖的package包/类
public void testCDT() {
	// Test CDT (with SMO -- -M)
	System.out.println("Test CDT");
	CDT h = new CDT();
	SMO smo = new SMO();
	smo.setBuildLogisticModels(true);
	h.setClassifier(smo);
	Result r = EvaluationTests.cvEvaluateClassifier(h);
	//System.out.println("CDT ACC: "+r.info.get("Accuracy"));
	assertTrue("CDT Accuracy Correct", r.info.get("Accuracy").equals("0.519 +/- 0.039") );
}
 
开发者ID:IsaacHaze,项目名称:meka,代码行数:12,代码来源:CCMethodsTests.java

示例7: buildClassifier

import weka.classifiers.functions.SMO; //导入方法依赖的package包/类
private Classifier buildClassifier(Instances trainingInstancesSet) throws Exception {
	MultiFilter graphemesFilter = this.initializeFiltersForGraphemes(trainingInstancesSet);

	FilteredClassifier filteredClassifier = new FilteredClassifier();
	filteredClassifier.setFilter(graphemesFilter);

	// SVM
	//
	SMO svm = new SMO();
	svm.setBuildLogisticModels(true);
	// // PolyKernel polyKernel = new PolyKernel();
	// // polyKernel.setExponent(2);
	// svm.setKernel(polyKernel);
	filteredClassifier.setClassifier(svm);

	// Naive Bayes
	//
	// filteredClassifier.setClassifier(new NaiveBayes());

	// Select 50 most informative attributes, after this - SVM
	//
	// AttributeSelectedClassifier attributeSelectionClassifier = new
	// AttributeSelectedClassifier();
	// attributeSelectionClassifier.setEvaluator(new
	// InfoGainAttributeEval());
	// Ranker ranker = new Ranker();
	// ranker.setNumToSelect(50);
	// attributeSelectionClassifier.setSearch(ranker);
	// attributeSelectionClassifier.setClassifier(filteredClassifier);
	// attributeSelectionClassifier.setClassifier(svm);
	// filteredClassifier.setClassifier(attributeSelectionClassifier);

	filteredClassifier.buildClassifier(trainingInstancesSet);

	return filteredClassifier;
}
 
开发者ID:lagodiuk,项目名称:pos-tagger,代码行数:37,代码来源:POSTagger.java


注:本文中的weka.classifiers.functions.SMO.setBuildLogisticModels方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。