public class ResidualSplit extends ClassifierSplitModel
Constructor and Description |
---|
ResidualSplit(int attIndex)
Creates a split object
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
Method not in use
|
void |
buildClassifier(Instances data,
double[][] dataZs,
double[][] dataWs)
Builds the split.
|
boolean |
checkModel(int minNumInstances)
Checks if there are at least 2 subsets that contain >= minNumInstances.
|
double |
entropyGain()
Computes entropy gain for current split.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
leftSide(Instances data)
Returns name of splitting attribute (left side of condition).
|
java.lang.String |
rightSide(int index,
Instances data)
Prints the condition satisfied by instances in a subset.
|
java.lang.String |
sourceExpression(int index,
Instances data)
Method not in use
|
double[] |
weights(Instance instance)
Method not in use
|
int |
whichSubset(Instance instance)
Returns index of subset instance is assigned to.
|
checkModel, classifyInstance, classProb, classProbLaplace, clone, codingCost, distribution, dumpLabel, dumpModel, numSubsets, resetDistribution, setDistribution, sourceClass, split
public ResidualSplit(int attIndex)
attIndex
- the index of the attribute to split onpublic void buildClassifier(Instances data, double[][] dataZs, double[][] dataWs) throws java.lang.Exception
java.lang.Exception
public double entropyGain() throws java.lang.Exception
java.lang.Exception
public boolean checkModel(int minNumInstances)
public final java.lang.String leftSide(Instances data)
leftSide
in class ClassifierSplitModel
data
- the data.public final java.lang.String rightSide(int index, Instances data)
rightSide
in class ClassifierSplitModel
public final int whichSubset(Instance instance) throws java.lang.Exception
ClassifierSplitModel
whichSubset
in class ClassifierSplitModel
java.lang.Exception
- if something goes wrongpublic void buildClassifier(Instances data)
buildClassifier
in class ClassifierSplitModel
public final double[] weights(Instance instance)
weights
in class ClassifierSplitModel
public final java.lang.String sourceExpression(int index, Instances data)
sourceExpression
in class ClassifierSplitModel
public java.lang.String getRevision()