public final class Impurity extends Object implements RevisionHandler
Constructor and Description |
---|
Impurity(int partition,
int attribute,
Instances inst,
int k)
Constructs an Impurity object containing the impurity values of partitioning the instances using an attribute
|
Modifier and Type | Method and Description |
---|---|
String |
getRevision()
Returns the revision string.
|
void |
incremental(double value,
int type)
Incrementally computes the impurirty values
|
String |
toString()
Converts an Impurity object to a string
|
public Impurity(int partition, int attribute, Instances inst, int k)
partition
- the index of the last instance in the left subsetattribute
- the attribute used in partitioninginst
- instancesk
- the order of the impurity; =1, the variance; =2, the stardard deviation; =k, the k-th order root of the variancepublic final String toString()
public final void incremental(double value, int type)
value
- the incremental valuetype
- if type=1, value will be added to the left subset; type=-1, to the right subset; type=0, initializespublic String getRevision()
getRevision
in interface RevisionHandler
Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.