source: src/main/java/weka/classifiers/trees/j48/SplitCriterion.java @ 16

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

Import di weka.

File size: 2.4 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 *    SplitCriterion.java
19 *    Copyright (C) 1999 University of Waikato, Hamilton, New Zealand
20 *
21 */
22
23package weka.classifiers.trees.j48;
24
25import weka.core.RevisionHandler;
26
27import java.io.Serializable;
28
29/**
30 * Abstract class for computing splitting criteria
31 * with respect to distributions of class values.
32 *
33 * @author Eibe Frank (eibe@cs.waikato.ac.nz)
34 * @version $Revision: 1.8 $
35 */
36public abstract class SplitCriterion
37  implements Serializable, RevisionHandler {
38
39  /** for serialization */
40  private static final long serialVersionUID = 5490996638027101259L;
41
42  /**
43   * Computes result of splitting criterion for given distribution.
44   *
45   * @return value of splitting criterion. 0 by default
46   */
47  public double splitCritValue(Distribution bags){
48
49    return 0;
50  }
51
52  /**
53   * Computes result of splitting criterion for given training and
54   * test distributions.
55   *
56   * @return value of splitting criterion. 0 by default
57   */
58  public double splitCritValue(Distribution train, Distribution test){
59
60    return 0;
61  }
62
63  /**
64   * Computes result of splitting criterion for given training and
65   * test distributions and given number of classes.
66   *
67   * @return value of splitting criterion. 0 by default
68   */
69  public double splitCritValue(Distribution train, Distribution test,
70                               int noClassesDefault){
71
72    return 0;
73  }
74
75  /**
76   * Computes result of splitting criterion for given training and
77   * test distributions and given default distribution.
78   *
79   * @return value of splitting criterion. 0 by default
80   */
81  public double splitCritValue(Distribution train, Distribution test,
82                               Distribution defC){
83
84    return 0;
85  }
86}
87
88
Note: See TracBrowser for help on using the repository browser.