类 ClassifierSplitModel
java.lang.Object
weka.classifiers.trees.j48.ClassifierSplitModel
- 所有已实现的接口:
Serializable
,Cloneable
,RevisionHandler
- 直接已知子类:
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.
- 版本:
- $Revision: 1.11 $
- 作者:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract void
buildClassifier
(Instances instances) Builds the classifier split model for the given set of instances.final boolean
Checks if generated model is valid.final double
classifyInstance
(Instance instance) Classifies a given instance.double
Gets class probability for instance.double
classProbLaplace
(int classIndex, Instance instance, int theSubset) Gets class probability for instance.clone()
Allows to clone a model (shallow copy).double
Returns coding costs of model.final Distribution
Returns the distribution of class values induced by the model.final String
Prints label for subset index of instances (eg class).final String
Prints the split model.abstract String
Prints left side of condition satisfied by instances.final int
Returns the number of created subsets for the split.void
resetDistribution
(Instances data) Sets distribution associated with model.abstract String
Prints left side of condition satisfied by instances in subset index.final String
sourceClass
(int index, Instances data) abstract String
sourceExpression
(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 int
whichSubset
(Instance instance) Returns index of subset instance is assigned to.从接口继承的方法 weka.core.RevisionHandler
getRevision
-
构造器详细资料
-
ClassifierSplitModel
public ClassifierSplitModel()
-
-
方法详细资料
-
clone
Allows to clone a model (shallow copy). -
buildClassifier
Builds the classifier split model for the given set of instances.- 抛出:
Exception
- if something goes wrong
-
checkModel
public final boolean checkModel()Checks if generated model is valid. -
classifyInstance
Classifies a given instance.- 抛出:
Exception
- if something goes wrong
-
classProb
Gets class probability for instance.- 抛出:
Exception
- if something goes wrong
-
classProbLaplace
Gets class probability for instance.- 抛出:
Exception
- if something goes wrong
-
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
Prints left side of condition satisfied by instances.- 参数:
data
- the data.
-
rightSide
Prints left side of condition satisfied by instances in subset index. -
dumpLabel
Prints label for subset index of instances (eg class).- 抛出:
Exception
- if something goes wrong
-
sourceClass
- 抛出:
Exception
-
sourceExpression
-
dumpModel
Prints the split model.- 抛出:
Exception
- if something goes wrong
-
numSubsets
public final int numSubsets()Returns the number of created subsets for the split. -
resetDistribution
Sets distribution associated with model.- 抛出:
Exception
-
split
Splits the given set of instances into subsets.- 抛出:
Exception
- if something goes wrong
-
weights
Returns weights if instance is assigned to more than one subset. Returns null if instance is only assigned to one subset. -
whichSubset
Returns index of subset instance is assigned to. Returns -1 if instance is assigned to more than one subset.- 抛出:
Exception
- if something goes wrong
-