All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.m5.Impurity

java.lang.Object
   |
   +----weka.classifiers.m5.Impurity

public final class Impurity
extends Object
Class for handling the impurity values when spliting the instances

Version:
$Revision: 1.2 $
Author:
Yong Wang (yongwang@cs.waikato.ac.nz)

Constructor Index

 o Impurity(int, int, Instances, int)
Constructs an Impurity object containing the impurity values of partitioning the instances using an attribute

Method Index

 o incremental(double, int)
Incrementally computes the impurirty values
 o toString()
Converts an Impurity object to a string

Constructors

 o Impurity
 public Impurity(int partition,
                 int attribute,
                 Instances inst,
                 int k)
Constructs an Impurity object containing the impurity values of partitioning the instances using an attribute

Parameters:
partition - the index of the last instance in the left subset
attribute - the attribute used in partitioning
inst - instances
k - the order of the impurity; =1, the variance; =2, the stardard deviation; =k, the k-th order root of the variance

Methods

 o toString
 public final String toString()
Converts an Impurity object to a string

Returns:
the converted string
Overrides:
toString in class Object
 o incremental
 public final void incremental(double value,
                               int type)
Incrementally computes the impurirty values

Parameters:
value - the incremental value
type - if type=1, value will be added to the left subset; type=-1, to the right subset; type=0, initializes

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home