All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.DistributionClassifier
java.lang.Object
|
+----weka.classifiers.Classifier
|
+----weka.classifiers.DistributionClassifier
- public abstract class DistributionClassifier
- extends Classifier
Abstract classification model that produces (for each test instance)
an estimate of the membership in each class
(ie. a probability distribution).
- Version:
- $Revision: 1.2 $
- Author:
- Eibe Frank (trigg@cs.waikato.ac.nz), Len Trigg (trigg@cs.waikato.ac.nz)
-
DistributionClassifier()
-
-
classifyInstance(Instance)
- Classifies the given test instance.
-
distributionForInstance(Instance)
- Predicts the class memberships for a given instance.
DistributionClassifier
public DistributionClassifier()
distributionForInstance
public abstract double[] distributionForInstance(Instance instance) throws Exception
- Predicts the class memberships for a given instance. If
an instance is unclassified, the returned array elements
must be all zero. If the class is numeric, the array
must consist of only one element, which contains the
predicted value.
- Parameters:
- instance - the instance to be classified
- Returns:
- an array containing the estimated membership
probabilities of the test instance in each class (this
should sum to at most 1)
- Throws: Exception
- if distribution could not be
computed successfully
classifyInstance
public double classifyInstance(Instance instance) throws Exception
- Classifies the given test instance. The instance has to belong to a
datasets when it's being classified.
- Parameters:
- instance - the instance to be classified
- Returns:
- the predicted most likely class for the instance or
Instance.missingValue() if no prediction is made
- Throws: Exception
- if an error occurred during the prediction
- Overrides:
- classifyInstance in class Classifier
All Packages Class Hierarchy This Package Previous Next Index WEKA's home