类 C45Split
java.lang.Object
weka.classifiers.trees.j48.ClassifierSplitModel
weka.classifiers.trees.j48.C45Split
- 所有已实现的接口:
Serializable
,Cloneable
,RevisionHandler
Class implementing a C4.5-type split on an attribute.
- 版本:
- $Revision: 1.13 $
- 作者:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明final int
attIndex()
Returns index of attribute for which split was generated.void
buildClassifier
(Instances trainInstances) Creates a C4.5-type split on the given data.final double
Gets class probability for instance.final double
Returns coding cost for split (used in rule learner).final double
Returns (C4.5-type) gain ratio for the generated split.Returns the revision string.final double
infoGain()
Returns (C4.5-type) information gain for the generated split.final String
Prints left side of condition..final double[][]
minsAndMaxs
(Instances data, double[][] minsAndMaxs, int index) Returns the minsAndMaxs of the index.th subset.void
resetDistribution
(Instances data) Sets distribution associated with model.final String
Prints the condition satisfied by instances in a subset.final void
setSplitPoint
(Instances allInstances) Sets split point to greatest value in given data smaller or equal to old split point.final String
sourceExpression
(int index, Instances data) Returns a string containing java source code equivalent to the test made at this node.final double[]
Returns weights if instance is assigned to more than one subset.final int
whichSubset
(Instance instance) Returns index of subset instance is assigned to.从类继承的方法 weka.classifiers.trees.j48.ClassifierSplitModel
checkModel, classifyInstance, classProbLaplace, clone, distribution, dumpLabel, dumpModel, numSubsets, sourceClass, split
-
构造器详细资料
-
C45Split
public C45Split(int attIndex, int minNoObj, double sumOfWeights) Initializes the split model.
-
-
方法详细资料
-
buildClassifier
Creates a C4.5-type split on the given data. Assumes that none of the class values is missing.- 指定者:
buildClassifier
在类中ClassifierSplitModel
- 抛出:
Exception
- if something goes wrong
-
attIndex
public final int attIndex()Returns index of attribute for which split was generated. -
classProb
Gets class probability for instance.- 覆盖:
classProb
在类中ClassifierSplitModel
- 抛出:
Exception
- if something goes wrong
-
codingCost
public final double codingCost()Returns coding cost for split (used in rule learner).- 覆盖:
codingCost
在类中ClassifierSplitModel
-
gainRatio
public final double gainRatio()Returns (C4.5-type) gain ratio for the generated split. -
infoGain
public final double infoGain()Returns (C4.5-type) information gain for the generated split. -
leftSide
Prints left side of condition..- 指定者:
leftSide
在类中ClassifierSplitModel
- 参数:
data
- training set.
-
rightSide
Prints the condition satisfied by instances in a subset.- 指定者:
rightSide
在类中ClassifierSplitModel
- 参数:
index
- of subsetdata
- training set.
-
sourceExpression
Returns a string containing java source code equivalent to the test made at this node. The instance being tested is called "i".- 指定者:
sourceExpression
在类中ClassifierSplitModel
- 参数:
index
- index of the nominal value testeddata
- the data containing instance structure info- 返回:
- a value of type 'String'
-
setSplitPoint
Sets split point to greatest value in given data smaller or equal to old split point. (C4.5 does this for some strange reason). -
minsAndMaxs
Returns the minsAndMaxs of the index.th subset. -
resetDistribution
Sets distribution associated with model.- 覆盖:
resetDistribution
在类中ClassifierSplitModel
- 抛出:
Exception
-
weights
Returns weights if instance is assigned to more than one subset. Returns null if instance is only assigned to one subset.- 指定者:
weights
在类中ClassifierSplitModel
-
whichSubset
Returns index of subset instance is assigned to. Returns -1 if instance is assigned to more than one subset.- 指定者:
whichSubset
在类中ClassifierSplitModel
- 抛出:
Exception
- if something goes wrong
-
getRevision
Returns the revision string.- 返回:
- the revision
-