source: trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/NormalWekaEvaluation.java @ 7

Last change on this file since 7 was 2, checked in by sherbold, 10 years ago
  • initial commit
  • Property svn:mime-type set to text/plain
File size: 761 bytes
Line 
1package de.ugoe.cs.cpdp.eval;
2
3import weka.classifiers.Classifier;
4import weka.classifiers.Evaluation;
5import weka.core.Instances;
6
7/**
8 * Implements the {@link AbstractWekaEvaluation} for evaluation on the test data.
9 * @author Steffen Herbold
10 *
11 */
12public class NormalWekaEvaluation extends AbstractWekaEvaluation {
13
14        /**
15         * @see de.ugoe.cs.cpdp.eval.AbstractWekaEvaluation#createEvaluator(weka.core.Instances, weka.classifiers.Classifier)
16         */
17        @Override
18        protected Evaluation createEvaluator(Instances testdata, Classifier classifier) {
19                try {
20                        final Evaluation eval = new Evaluation(testdata);
21                        eval.evaluateModel(classifier, testdata);
22                        return eval;
23                } catch (Exception e) {
24                        throw new RuntimeException(e);
25                }
26        }
27}
Note: See TracBrowser for help on using the repository browser.