Package weka.classifiers.trees.m5
Class CorrelationSplitInfo
java.lang.Object
weka.classifiers.trees.m5.CorrelationSplitInfo
- All Implemented Interfaces:
Serializable,Cloneable,SplitEvaluate,RevisionHandler
public final class CorrelationSplitInfo
extends Object
implements Cloneable, Serializable, SplitEvaluate, RevisionHandler
Finds split points using correlation.
- Version:
- $Revision: 10169 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCorrelationSplitInfo(int low, int high, int attr) Constructs an object which contains the split information -
Method Summary
Modifier and TypeMethodDescriptionfinal voidFinds the best splitting point for an attribute in the instancesfinal SplitEvaluatecopy()Makes a copy of this CorrelationSplitInfo objectReturns the revision string.final voidinitialize(int low, int high, int attr) Resets the object of split informationdoubleReturns the impurity of this splitintposition()Returns the position of the split in the sorted values.intReturns the attribute used in this splitdoubleReturns the split value
-
Constructor Details
-
CorrelationSplitInfo
public CorrelationSplitInfo(int low, int high, int attr) Constructs an object which contains the split information- Parameters:
low- the index of the first instancehigh- the index of the last instanceattr- an attribute
-
-
Method Details
-
copy
Makes a copy of this CorrelationSplitInfo object- Specified by:
copyin interfaceSplitEvaluate- Returns:
- a copy of the object
- Throws:
Exception
-
initialize
public final void initialize(int low, int high, int attr) Resets the object of split information- Parameters:
low- the index of the first instancehigh- the index of the last instanceattr- the attribute
-
attrSplit
Finds the best splitting point for an attribute in the instances- Specified by:
attrSplitin interfaceSplitEvaluate- Parameters:
attr- the splitting attributeinst- the instances- Throws:
Exception- if something goes wrong
-
maxImpurity
public double maxImpurity()Returns the impurity of this split- Specified by:
maxImpurityin interfaceSplitEvaluate- Returns:
- the impurity of this split
-
splitAttr
public int splitAttr()Returns the attribute used in this split- Specified by:
splitAttrin interfaceSplitEvaluate- Returns:
- the attribute used in this split
-
position
public int position()Returns the position of the split in the sorted values. -1 indicates that a split could not be found.- Specified by:
positionin interfaceSplitEvaluate- Returns:
- an
intvalue
-
splitValue
public double splitValue()Returns the split value- Specified by:
splitValuein interfaceSplitEvaluate- Returns:
- the split value
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-