Package weka.classifiers.evaluation
Interface InformationTheoreticEvaluationMetric
public interface InformationTheoreticEvaluationMetric
Primarily a marker interface for information theoretic evaluation metrics to
implement. Allows the command line interface to display these metrics or not
based on user-supplied options
- Version:
- $Revision: 9320 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Method Summary
Modifier and TypeMethodDescriptionReturn a formatted string (suitable for displaying in console or GUI output) containing all the statistics that this metric computes.void
updateStatsForClassifier
(double[] predictedDistribution, Instance instance) Updates the statistics about a classifiers performance for the current test instance.void
updateStatsForConditionalDensityEstimator
(ConditionalDensityEstimator classifier, Instance classMissing, double classValue) Updates stats for conditional density estimator based on current test instance.void
updateStatsForPredictor
(double predictedValue, Instance instance) Updates the statistics about a predictors performance for the current test instance.
-
Method Details
-
updateStatsForClassifier
Updates the statistics about a classifiers performance for the current test instance. Gets called when the class is nominal. Implementers need only implement this method if it is not possible to compute their statistics from what is stored in the base Evaluation object.- Parameters:
predictedDistribution
- the probabilities assigned to each classinstance
- the instance to be classified- Throws:
Exception
- if the class of the instance is not set
-
updateStatsForPredictor
Updates the statistics about a predictors performance for the current test instance. Gets called when the class is numeric. Implementers need only implement this method if it is not possible to compute their statistics from what is stored in the base Evaluation object.- Parameters:
predictedValue
- the numeric value the classifier predictsinstance
- the instance to be classified- Throws:
Exception
- if the class of the instance is not set
-
updateStatsForConditionalDensityEstimator
void updateStatsForConditionalDensityEstimator(ConditionalDensityEstimator classifier, Instance classMissing, double classValue) throws Exception Updates stats for conditional density estimator based on current test instance. Gets called when the class is numeric and the classifier is a ConditionalDensityEstimators. Implementers need only implement this method if it is not possible to compute their statistics from what is stored in the base Evaluation object.- Parameters:
classifier
- the conditional density estimatorclassMissing
- the instance for which density is to be computed, without a class valueclassValue
- the class value of this instance- Throws:
Exception
- if density could not be computed successfully
-
toSummaryString
String toSummaryString()Return a formatted string (suitable for displaying in console or GUI output) containing all the statistics that this metric computes.- Returns:
- a formatted string containing all the computed statistics
-