Package weka.classifiers.trees.lmt
Class ResidualSplit
java.lang.Object
weka.classifiers.trees.j48.ClassifierSplitModel
weka.classifiers.trees.lmt.ResidualSplit
- All Implemented Interfaces:
Serializable,Cloneable,RevisionHandler
Helper class for logistic model trees (weka.classifiers.trees.lmt.LMT) to implement the
splitting criterion based on residuals of the LogitBoost algorithm.
- Version:
- $Revision: 8034 $
- Author:
- Niels Landwehr
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildClassifier(Instances data) Method not in usevoidbuildClassifier(Instances data, double[][] dataZs, double[][] dataWs) Builds the split.booleancheckModel(int minNumInstances) Checks if there are at least 2 subsets that contain >= minNumInstances.doubleComputes entropy gain for current split.Returns the revision string.final StringReturns name of splitting attribute (left side of condition).final StringPrints the condition satisfied by instances in a subset.final StringsourceExpression(int index, Instances data) Method not in usefinal double[]Method not in usefinal intwhichSubset(Instance instance) Returns index of subset instance is assigned to.Methods inherited from class weka.classifiers.trees.j48.ClassifierSplitModel
checkModel, classifyInstance, classProb, classProbLaplace, clone, codingCost, distribution, dumpLabel, dumpModel, numSubsets, resetDistribution, setDistribution, sourceClass, split
-
Constructor Details
-
ResidualSplit
public ResidualSplit(int attIndex) Creates a split object- Parameters:
attIndex- the index of the attribute to split on
-
-
Method Details
-
buildClassifier
Builds the split. Needs the Z/W values of LogitBoost for the set of instances.- Throws:
Exception
-
entropyGain
Computes entropy gain for current split.- Throws:
Exception
-
checkModel
public boolean checkModel(int minNumInstances) Checks if there are at least 2 subsets that contain >= minNumInstances. -
leftSide
Returns name of splitting attribute (left side of condition).- Specified by:
leftSidein classClassifierSplitModel- Parameters:
data- the data.
-
rightSide
Prints the condition satisfied by instances in a subset.- Specified by:
rightSidein classClassifierSplitModel
-
whichSubset
Description copied from class:ClassifierSplitModelReturns index of subset instance is assigned to. Returns -1 if instance is assigned to more than one subset.- Specified by:
whichSubsetin classClassifierSplitModel- Throws:
Exception- if something goes wrong
-
buildClassifier
Method not in use- Specified by:
buildClassifierin classClassifierSplitModel
-
weights
Method not in use- Specified by:
weightsin classClassifierSplitModel
-
sourceExpression
Method not in use- Specified by:
sourceExpressionin classClassifierSplitModel
-
getRevision
Returns the revision string.- Returns:
- the revision
-