Package weka.classifiers.rules.part
Class MakeDecList
java.lang.Object
weka.classifiers.rules.part.MakeDecList
- All Implemented Interfaces:
Serializable
,RevisionHandler
Class for handling a decision list.
- Version:
- $Revision: 14511 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
ConstructorDescriptionMakeDecList
(ModelSelection toSelectLocModel, double cf, int minNum) Constructor for dec list pruned using C4.5 pruning.MakeDecList
(ModelSelection toSelectLocModel, int minNum) Constructor for unpruned dec list.MakeDecList
(ModelSelection toSelectLocModel, int num, int minNum, int seed) Constructor for dec list pruned using hold-out pruning. -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildClassifier
(Instances data) Builds dec list.double
classifyInstance
(Instance instance) Classifies an instance.double[]
distributionForInstance
(Instance instance) Returns the class distribution for an instance.Returns the revision string.int
numRules()
Outputs the number of rules in the classifier.toString()
Outputs the classifier into a string.
-
Constructor Details
-
MakeDecList
Constructor for unpruned dec list. -
MakeDecList
Constructor for dec list pruned using C4.5 pruning. -
MakeDecList
Constructor for dec list pruned using hold-out pruning.
-
-
Method Details
-
buildClassifier
Builds dec list.- Throws:
Exception
- if dec list can't be built successfully
-
toString
Outputs the classifier into a string. -
classifyInstance
Classifies an instance.- Throws:
Exception
- if instance can't be classified
-
distributionForInstance
Returns the class distribution for an instance.- Throws:
Exception
- if distribution can't be computed
-
numRules
public int numRules()Outputs the number of rules in the classifier. -
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-