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


Java Logistic类代码示例

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


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

示例1: buildRegression

import weka.classifiers.functions.Logistic; //导入依赖的package包/类
public void buildRegression(){	
	logReg = new Logistic();

	try {
		logReg.buildClassifier(iris);
	} catch (Exception e) {
	} 
	System.out.println(logReg);
}
 
开发者ID:PacktPublishing,项目名称:Java-Data-Science-Cookbook,代码行数:10,代码来源:WekaLogisticRegressionTest.java

示例2: LearnLogisticRegression

import weka.classifiers.functions.Logistic; //导入依赖的package包/类
@Override
public void LearnLogisticRegression() throws Exception 
{
	trainedData.setClassIndex(trainedData.numAttributes()-1);
       filter=new StringToWordVector();
       classifier=new FilteredClassifier();
       classifier.setFilter(filter);
       classifier.setClassifier(new Logistic());
       classifier.buildClassifier(trainedData);
	
}
 
开发者ID:unsw-cse-soc,项目名称:Data-curation-API,代码行数:12,代码来源:ExtractClassificationTextLogisticRegressionImpl.java

示例3: EvaluateLogisticRegression

import weka.classifiers.functions.Logistic; //导入依赖的package包/类
@Override
public List<Classification> EvaluateLogisticRegression() throws Exception
{
	    List<Classification> lstEvaluationDetail=new ArrayList<>();
	    trainedData.setClassIndex(trainedData.numAttributes()-1);
        filter=new StringToWordVector();
        classifier=new FilteredClassifier();
        classifier.setFilter(filter);
        classifier.setClassifier(new Logistic());
        Evaluation eval=new Evaluation(trainedData);
        eval.crossValidateModel(classifier, trainedData, 4, new Random(1));
        /*try
        {
        for(int i=0;i<10000;i++)
        {
        	cls.setPrecision(eval.precision(i));
        	cls.setRecall(eval.recall(i));
        	cls.setAuc(eval.areaUnderPRC(i));
        	cls.setFMeasure(eval.fMeasure(i));
        	cls.setFn(eval.falseNegativeRate(i));
        	cls.setFp(eval.falsePositiveRate(i));
        	cls.setTn(eval.trueNegativeRate(i));
        	cls.setTp(eval.truePositiveRate(i));
        	cls.setMeanAbsoluteError(eval.meanAbsoluteError());
        	cls.setRelativeAbsoluteError(eval.relativeAbsoluteError());
        	cls.setCorrect(eval.correct());
        	cls.setKappa(eval.kappa());
        	cls.setNumInstances(eval.numInstances());
        	cls.setInCorrect(eval.incorrect());
        	lstEvaluationDetail.add(new Classification(cls.getPrecision(),
        			cls.getRecall(),
        			cls.getAuc(),
        			cls.getCorrect(),
        			cls.getInCorrect(),
        			cls.getErrorRate(),
        			cls.getFn(),
        			cls.getFp(),
        			cls.getTn(),
        			cls.getTp(),
        			cls.getKappa(),
        			cls.getMeanAbsoluteError(),
        			cls.getNumInstances(),
        			cls.getRelativeAbsoluteError(),
        			cls.getFMeasure()));
        }
        }
        catch(Exception ex)
        {
        	
        }*/
        return lstEvaluationDetail;
}
 
开发者ID:unsw-cse-soc,项目名称:Data-curation-API,代码行数:53,代码来源:ExtractClassificationTextLogisticRegressionImpl.java

示例4: main

import weka.classifiers.functions.Logistic; //导入依赖的package包/类
public static void main(String[] args){
	Logistic lg = new Logistic();
	AbstractClassifier.runClassifier(lg, args);
}
 
开发者ID:seqcode,项目名称:seqcode-core,代码行数:5,代码来源:WekaLogistic.java

示例5: getClassifier

import weka.classifiers.functions.Logistic; //导入依赖的package包/类
/**
 * returns the classifier
 * @return
 */
public Logistic getClassifier(){
	return this.classifier;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:8,代码来源:SimpleMetaEDAConfidenceFeatures.java

示例6: getDefaultNominalClassifier

import weka.classifiers.functions.Logistic; //导入依赖的package包/类
/**
 * Returns the default nominal classifier.
 *
 * @return the default
 */
protected Classifier getDefaultNominalClassifier() {
  return new Logistic();
}
 
开发者ID:fracpete,项目名称:missing-values-imputation-weka-package,代码行数:9,代码来源:IRMI.java

示例7: LogisticClassifier

import weka.classifiers.functions.Logistic; //导入依赖的package包/类
public LogisticClassifier(String trainFile, String testFile) {
	super(trainFile, testFile);

	this.cmodel = new Logistic();

}
 
开发者ID:mommi84,项目名称:BALLAD,代码行数:7,代码来源:LogisticClassifier.java


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