use of edu.cmu.minorthird.classify.DatasetClassifierTeacher in project lucida by claritylab.
the class ScoreNormalizationFilter method train.
/**
* Trains a classifier using the given training data, features and model.
*
* @param serializedDir directory containing serialized results
* @param features selected features
* @param model selected model
* @return trained classifier
*/
public static Classifier train(String serializedDir, String[] features, String model) {
// create training set with given features from serialized results
Dataset trainingSet = createDataset(features, serializedDir);
// create learner for given model
ClassifierLearner learner = createLearner(model);
// train classifier
Classifier classifier = new DatasetClassifierTeacher(trainingSet).train(learner);
return classifier;
}
use of edu.cmu.minorthird.classify.DatasetClassifierTeacher in project lucida by claritylab.
the class HierarchicalClassifierTrainer method trainClassifier.
public void trainClassifier() {
runTime = System.currentTimeMillis();
ClassifierLearner learner = createHierarchicalClassifierLearner(learnerNames);
classifier = new DatasetClassifierTeacher(trainingSet).train(learner);
runTime = System.currentTimeMillis() - runTime;
}
Aggregations