source: trunk/CrossPare/src/de/ugoe/cs/cpdp/training/DecisionTreeTraining.java @ 17

Last change on this file since 17 was 2, checked in by sherbold, 10 years ago
  • initial commit
  • Property svn:mime-type set to text/plain
File size: 644 bytes
Line 
1package de.ugoe.cs.cpdp.training;
2
3import weka.classifiers.Classifier;
4import weka.classifiers.meta.CVParameterSelection;
5import weka.classifiers.trees.J48;
6
7public class DecisionTreeTraining extends WekaTraining {
8
9        @Override
10        public String getName() {
11                return "C4.5-DTree";
12        }
13
14        @Override
15        protected Classifier setupClassifier() {
16                final CVParameterSelection ps = new CVParameterSelection();
17                ps.setClassifier(new J48());
18                try {
19                        // Parameter optimization with 5x5 CV
20                        ps.setNumFolds(5);
21                        ps.addCVParameter("C 0.1 0.5 5");
22                } catch (Exception e) {
23                        throw new RuntimeException(e);
24                }
25                return ps;
26        }
27}
Note: See TracBrowser for help on using the repository browser.