source: src/main/java/weka/classifiers/trees/m5/SplitEvaluate.java @ 21

Last change on this file since 21 was 4, checked in by gnappo, 14 years ago

Import di weka.

File size: 2.0 KB
Line 
1/*
2 *    This program is free software; you can redistribute it and/or modify
3 *    it under the terms of the GNU General Public License as published by
4 *    the Free Software Foundation; either version 2 of the License, or
5 *    (at your option) any later version.
6 *
7 *    This program is distributed in the hope that it will be useful,
8 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
9 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 *    GNU General Public License for more details.
11 *
12 *    You should have received a copy of the GNU General Public License
13 *    along with this program; if not, write to the Free Software
14 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */
16
17/*
18 *    SplitEvaluate.java
19 *    Copyright (C) 2000 University of Waikato, Hamilton, New Zealand
20 *   
21 */
22
23package weka.classifiers.trees.m5;
24
25import weka.core.Instances;
26
27/**
28 * Interface for objects that determine a split point on an attribute
29 *
30 * @author Mark Hall (mhall@cs.waikato.ac.nz)
31 * @version $Revision: 1.3 $
32 */
33public interface SplitEvaluate {
34 
35  /**
36   * makes a copy of the SplitEvaluate object
37   * @return a copy of the object
38   */
39  SplitEvaluate copy () throws Exception;
40
41  /**
42   * Finds the best splitting point for an attribute in the instances
43   * @param attr the splitting attribute
44   * @param inst the instances
45   * @exception Exception if something goes wrong
46   */
47   void attrSplit (int attr, Instances inst) throws Exception;
48
49  /**
50   * Returns the impurity of this split
51   *
52   * @return the impurity of this split
53   */
54   double maxImpurity();
55
56  /**
57   * Returns the position of the split in the sorted values. -1 indicates that
58   * a split could not be found.
59   *
60   * @return an <code>int</code> value
61   */
62   int position();
63 
64  /**
65   * Returns the attribute used in this split
66   *
67   * @return the attribute used in this split
68   */
69   int splitAttr();
70
71  /**
72   * Returns the split value
73   *
74   * @return the split value
75   */
76   double splitValue();
77
78}
Note: See TracBrowser for help on using the repository browser.