public class ClassificationViaRegression extends SingleClassifierEnhancer implements TechnicalInformationHandler, WeightedInstancesHandler
@article{Frank1998, author = {E. Frank and Y. Wang and S. Inglis and G. Holmes and I.H. Witten}, journal = {Machine Learning}, number = {1}, pages = {63-76}, title = {Using model trees for classification}, volume = {32}, year = {1998} }Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.trees.M5P)
Options specific to classifier weka.classifiers.trees.M5P:
-N Use unpruned tree/rules
-U Use unsmoothed predictions
-R Build regression tree/rule rather than a model tree/rule
-M <minimum number of instances> Set minimum number of instances per leaf (default 4)
-L Save instances at the nodes in the tree (for visualization purposes)
BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT
Constructor and Description |
---|
ClassificationViaRegression()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances insts)
Builds the classifiers.
|
double[] |
distributionForInstance(Instance inst)
Returns the distribution for an instance.
|
double[][] |
distributionsForInstances(Instances insts)
Returns predictions for a whole set of instances.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
java.lang.String |
globalInfo()
Returns a string describing classifier
|
boolean |
implementsMoreEfficientBatchPrediction()
Return whether this classifier configuration yields more efficient batch prediction
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
java.lang.String |
toString()
Prints the classifiers.
|
classifierTipText, getClassifier, getOptions, listOptions, postExecution, preExecution, setClassifier, setOptions
batchSizeTipText, classifyInstance, debugTipText, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
makeCopy
public ClassificationViaRegression()
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface Classifier
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class SingleClassifierEnhancer
Capabilities
public void buildClassifier(Instances insts) throws java.lang.Exception
buildClassifier
in interface Classifier
insts
- the training data.java.lang.Exception
- if a classifier can't be builtpublic double[] distributionForInstance(Instance inst) throws java.lang.Exception
distributionForInstance
in interface Classifier
distributionForInstance
in class AbstractClassifier
inst
- the instance to get the distribution forjava.lang.Exception
- if the distribution can't be computed successfullypublic boolean implementsMoreEfficientBatchPrediction()
implementsMoreEfficientBatchPrediction
in interface BatchPredictor
implementsMoreEfficientBatchPrediction
in class AbstractClassifier
public double[][] distributionsForInstances(Instances insts) throws java.lang.Exception
distributionsForInstances
in interface BatchPredictor
distributionsForInstances
in class AbstractClassifier
insts
- the instances to make predictions forjava.lang.Exception
- if a problem occurs.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClassifier
public static void main(java.lang.String[] argv)
argv
- the options for the learner