public final class Impurity extends java.lang.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 |
---|---|
java.lang.String |
getRevision()
Returns the revision string.
|
void |
incremental(double value,
int type)
Incrementally computes the impurirty values
|
java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
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 java.lang.String getRevision()
getRevision
in interface RevisionHandler