source: trunk/CrossPare/src/de/ugoe/cs/cpdp/training/RandomForestBagging.java @ 9

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