use of edu.cmu.minorthird.classify.ClassifierLearner 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;
}
use of edu.cmu.minorthird.classify.ClassifierLearner in project lucida by claritylab.
the class HierarchicalClassifierTrainer method runExperiment.
public Evaluation runExperiment() {
runTime = System.currentTimeMillis();
ClassifierLearner learner = createHierarchicalClassifierLearner(learnerNames);
if (crossValidationFolds < 0) {
evaluation = Tester.evaluate(learner, trainingSet, testingSet);
} else {
Splitter splitter = new CrossValSplitter(new RandomElement(System.currentTimeMillis()), crossValidationFolds);
cvDataset = new CrossValidatedDataset(learner, trainingSet, splitter, true);
evaluation = cvDataset.getEvaluation();
//remove later
//ViewerFrame frame=new ViewerFrame(trainingFile,cvDataset.toGUI());
//frame.setVisible(true);
//evaluation=Tester.evaluate(learner,trainingSet,splitter);
}
runTime = System.currentTimeMillis() - runTime;
return evaluation;
}
Aggregations