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
ConstructorDescriptionNoSplit
(Distribution distribution) Creates "no-split"-split for given distribution. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
buildClassifier
(Instances instances) Creates a "no-split"-split for a given set of instances.Returns the revision string.final String
Does nothing because no condition has to be satisfied.final String
Does nothing because no condition has to be satisfied.final String
sourceExpression
(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 int
whichSubset
(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:
buildClassifier
in classClassifierSplitModel
- Throws:
Exception
- if split can't be built successfully
-
whichSubset
Always returns 0 because only there is only one subset.- Specified by:
whichSubset
in classClassifierSplitModel
-
weights
Always returns null because there is only one subset.- Specified by:
weights
in classClassifierSplitModel
-
leftSide
Does nothing because no condition has to be satisfied.- Specified by:
leftSide
in classClassifierSplitModel
- Parameters:
instances
- the data.
-
rightSide
Does nothing because no condition has to be satisfied.- Specified by:
rightSide
in 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:
sourceExpression
in 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
-