Package weka.classifiers.trees.m5
Class Impurity
java.lang.Object
weka.classifiers.trees.m5.Impurity
- All Implemented Interfaces:
RevisionHandler
Class for handling the impurity values when spliting the instances
- Version:
- $Revision: 8034 $
- Author:
- Yong Wang (yongwang@cs.waikato.ac.nz)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the revision string.final void
incremental
(double value, int type) Incrementally computes the impurirty valuesfinal String
toString()
Converts an Impurity object to a string
-
Constructor Details
-
Impurity
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 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 variance
-
-
Method Details
-
toString
Converts an Impurity object to a string -
incremental
public final void incremental(double value, int type) Incrementally computes the impurirty values- Parameters:
value
- the incremental valuetype
- if type=1, value will be added to the left subset; type=-1, to the right subset; type=0, initializes
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-