本文整理汇总了Java中cc.mallet.classify.BalancedWinnowTrainer类的典型用法代码示例。如果您正苦于以下问题:Java BalancedWinnowTrainer类的具体用法?Java BalancedWinnowTrainer怎么用?Java BalancedWinnowTrainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BalancedWinnowTrainer类属于cc.mallet.classify包,在下文中一共展示了BalancedWinnowTrainer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TokenClassifiers
import cc.mallet.classify.BalancedWinnowTrainer; //导入依赖的package包/类
public TokenClassifiers(InstanceList trainList, int randSeed, int numCV)
{
// this(new AdaBoostM2Trainer(new DecisionTreeTrainer(2), 10), trainList, randSeed, numCV);
// this(new NaiveBayesTrainer(), trainList, randSeed, numCV);
this(new BalancedWinnowTrainer(), trainList, randSeed, numCV);
// this(new SVMTrainer(), trainList, randSeed, numCV);
}
示例2: reset
import cc.mallet.classify.BalancedWinnowTrainer; //导入依赖的package包/类
public void reset() {
switch (type) {
case NaiveBayes:
this.trainer = new NaiveBayesTrainer();
this.classifier = null;
break;
case AdaBoost:
this.trainer = new AdaBoostTrainer(new DecisionTreeTrainer());
this.classifier = null;
break;
case AdaBoostM2:
this.trainer = new AdaBoostM2Trainer(new DecisionTreeTrainer());
this.classifier = null;
break;
// case Bagging:
// this.trainer = new BaggingTrainer(new DecisionTreeTrainer());
// this.classifier = null;
// break;
case BalancedWinnow:
this.trainer = new BalancedWinnowTrainer();
this.classifier = null;
break;
// case ConfidencePredictingClassifier:
// this.trainer = new ConfidencePredictingClassifierTrainer(new
// DecisionTreeTrainer());
// this.classifier = null;
// break;
case DecisionTree:
this.trainer = new DecisionTreeTrainer();
this.classifier = null;
break;
default:
throw new RuntimeException("not implemented");
}
}