source: orange/source/orange/tdidt_stop.hpp @ 6531:57bdc92cd8e9

Revision 6531:57bdc92cd8e9, 1.7 KB checked in by janezd <janez.demsar@…>, 4 years ago (diff)
  • changed licenses to GPL 3.0
Line 
1/*
2    This file is part of Orange.
3   
4    Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana
5    Contact: janez.demsar@fri.uni-lj.si
6
7    Orange is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11
12    Orange is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with Orange.  If not, see <http://www.gnu.org/licenses/>.
19*/
20
21
22#ifndef __TDIDT_STOP_HPP
23#define __TDIDT_STOP_HPP
24
25#include "root.hpp"
26
27WRAPPER(ExampleGenerator)
28WRAPPER(DomainContingency)
29
30class ORANGE_API TTreeStopCriteria : public TOrange {
31public:
32  __REGISTER_CLASS
33  virtual bool operator()(PExampleGenerator, const int &weightID = 0, PDomainContingency =PDomainContingency());
34};
35
36WRAPPER(TreeStopCriteria);
37
38
39class ORANGE_API TTreeStopCriteria_common : public TTreeStopCriteria {
40public:
41  __REGISTER_CLASS
42  float maxMajority; //P a maximal proportion of majority class for division to continue
43  float minExamples; //P a minimal number of examples for division to continue
44
45  TTreeStopCriteria_common(const TTreeStopCriteria_common &);
46  TTreeStopCriteria_common(float aMaxMajor=1, float aMinExamples=0);
47
48  virtual bool operator()(PExampleGenerator gen, const int &weightID = 0, PDomainContingency =PDomainContingency());
49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.