|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.trees.j48.ClassifierSplitModel
Abstract class for classification models that can be used recursively to split the data.
Constructor Summary | |
ClassifierSplitModel()
|
Method Summary | |
abstract void |
buildClassifier(Instances instances)
Builds the classifier split model for the given set of instances. |
boolean |
checkModel()
Checks if generated model is valid. |
double |
classifyInstance(Instance instance)
Classifies a given instance. |
double |
classProb(int classIndex,
Instance instance,
int theSubset)
Gets class probability for instance. |
double |
classProbLaplace(int classIndex,
Instance instance,
int theSubset)
Gets class probability for instance. |
java.lang.Object |
clone()
Allows to clone a model (shallow copy). |
double |
codingCost()
Returns coding costs of model. |
Distribution |
distribution()
Returns the distribution of class values induced by the model. |
java.lang.String |
dumpLabel(int index,
Instances data)
Prints label for subset index of instances (eg class). |
java.lang.String |
dumpModel(Instances data)
Prints the split model. |
abstract java.lang.String |
leftSide(Instances data)
Prints left side of condition satisfied by instances. |
int |
numSubsets()
Returns the number of created subsets for the split. |
void |
resetDistribution(Instances data)
Sets distribution associated with model. |
abstract java.lang.String |
rightSide(int index,
Instances data)
Prints left side of condition satisfied by instances in subset index. |
java.lang.String |
sourceClass(int index,
Instances data)
|
abstract java.lang.String |
sourceExpression(int index,
Instances data)
|
Instances[] |
split(Instances data)
Splits the given set of instances into subsets. |
abstract double[] |
weights(Instance instance)
Returns weights if instance is assigned to more than one subset. |
abstract int |
whichSubset(Instance instance)
Returns index of subset instance is assigned to. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassifierSplitModel()
Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public abstract void buildClassifier(Instances instances) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic final boolean checkModel()
public final double classifyInstance(Instance instance) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic double classProb(int classIndex, Instance instance, int theSubset) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic double classProbLaplace(int classIndex, Instance instance, int theSubset) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic double codingCost()
public final Distribution distribution()
public abstract java.lang.String leftSide(Instances data)
data
- the data.public abstract java.lang.String rightSide(int index, Instances data)
public final java.lang.String dumpLabel(int index, Instances data) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic final java.lang.String sourceClass(int index, Instances data) throws java.lang.Exception
java.lang.Exception
public abstract java.lang.String sourceExpression(int index, Instances data)
public final java.lang.String dumpModel(Instances data) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic final int numSubsets()
public void resetDistribution(Instances data) throws java.lang.Exception
java.lang.Exception
public final Instances[] split(Instances data) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic abstract double[] weights(Instance instance)
public abstract int whichSubset(Instance instance) throws java.lang.Exception
java.lang.Exception
- if something goes wrong
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London