Class ClassifierSplitModel
java.lang.Object
weka.classifiers.trees.j48.ClassifierSplitModel
- All Implemented Interfaces:
Serializable, Cloneable, RevisionHandler
- Direct Known Subclasses:
BinC45Split, C45Split, GraftSplit, NBTreeNoSplit, NBTreeSplit, NoSplit, ResidualSplit
public abstract class ClassifierSplitModel
extends Object
implements Cloneable, Serializable, RevisionHandler
Abstract class for classification models that can be used
recursively to split the data.
- Version:
- $Revision: 1.11 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidbuildClassifier(Instances instances) Builds the classifier split model for the given set of instances.final booleanChecks if generated model is valid.final doubleclassifyInstance(Instance instance) Classifies a given instance.doubleGets class probability for instance.doubleclassProbLaplace(int classIndex, Instance instance, int theSubset) Gets class probability for instance.clone()Allows to clone a model (shallow copy).doubleReturns coding costs of model.final DistributionReturns the distribution of class values induced by the model.final StringPrints label for subset index of instances (eg class).final StringPrints the split model.abstract StringPrints left side of condition satisfied by instances.final intReturns the number of created subsets for the split.voidresetDistribution(Instances data) Sets distribution associated with model.abstract StringPrints left side of condition satisfied by instances in subset index.final StringsourceClass(int index, Instances data) abstract StringsourceExpression(int index, Instances data) final Instances[]Splits the given set of instances into subsets.abstract double[]Returns weights if instance is assigned to more than one subset.abstract intwhichSubset(Instance instance) Returns index of subset instance is assigned to.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RevisionHandler
getRevision
-
Constructor Details
-
ClassifierSplitModel
public ClassifierSplitModel()
-
-
Method Details
-
clone
Allows to clone a model (shallow copy). -
buildClassifier
-
checkModel
public final boolean checkModel()Checks if generated model is valid. -
classifyInstance
-
classProb
-
classProbLaplace
-
codingCost
public double codingCost()Returns coding costs of model. Returns 0 if not overwritten. -
distribution
Returns the distribution of class values induced by the model. -
leftSide
-
rightSide
-
dumpLabel
-
sourceClass
-
sourceExpression
-
dumpModel
-
numSubsets
public final int numSubsets()Returns the number of created subsets for the split. -
resetDistribution
-
split
-
weights
Returns weights if instance is assigned to more than one subset. Returns null if instance is only assigned to one subset. -
whichSubset
-