Package weka.classifiers.trees.j48
Class NoSplit
java.lang.Object
weka.classifiers.trees.j48.ClassifierSplitModel
weka.classifiers.trees.j48.NoSplit
- All Implemented Interfaces:
Serializable,Cloneable,RevisionHandler
Class implementing a "no-split"-split.
- Version:
- $Revision: 8034 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNoSplit(Distribution distribution) Creates "no-split"-split for given distribution. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidbuildClassifier(Instances instances) Creates a "no-split"-split for a given set of instances.Returns the revision string.final StringDoes nothing because no condition has to be satisfied.final StringDoes nothing because no condition has to be satisfied.final StringsourceExpression(int index, Instances data) Returns a string containing java source code equivalent to the test made at this node.final double[]Always returns null because there is only one subset.final intwhichSubset(Instance instance) Always returns 0 because only there is only one subset.Methods inherited from class weka.classifiers.trees.j48.ClassifierSplitModel
checkModel, classifyInstance, classProb, classProbLaplace, clone, codingCost, distribution, dumpLabel, dumpModel, numSubsets, resetDistribution, setDistribution, sourceClass, split
-
Constructor Details
-
NoSplit
Creates "no-split"-split for given distribution.
-
-
Method Details
-
buildClassifier
Creates a "no-split"-split for a given set of instances.- Specified by:
buildClassifierin classClassifierSplitModel- Throws:
Exception- if split can't be built successfully
-
whichSubset
Always returns 0 because only there is only one subset.- Specified by:
whichSubsetin classClassifierSplitModel
-
weights
Always returns null because there is only one subset.- Specified by:
weightsin classClassifierSplitModel
-
leftSide
Does nothing because no condition has to be satisfied.- Specified by:
leftSidein classClassifierSplitModel- Parameters:
instances- the data.
-
rightSide
Does nothing because no condition has to be satisfied.- Specified by:
rightSidein classClassifierSplitModel
-
sourceExpression
Returns a string containing java source code equivalent to the test made at this node. The instance being tested is called "i".- Specified by:
sourceExpressionin classClassifierSplitModel- Parameters:
index- index of the nominal value testeddata- the data containing instance structure info- Returns:
- a value of type 'String'
-
getRevision
Returns the revision string.- Returns:
- the revision
-