public class ClassPerplexity extends AbstractEvaluationMetric implements InformationTheoreticEvaluationMetric
AbstractEvaluationMetric.setBaseEvaluation(Evaluation eval).
Evaluation.getPluginMetric(String metricName), or the method
Evaluation.getPluginMetrics() to get a list of all the plugin metrics associated with that Evaluation object.Evaluation,
Serialized FormAbstractEvaluationMetric.UnknownStatisticException| Modifier and Type | Field and Description |
|---|---|
static String |
METRIC_NAME
Constant string with the metric name
|
| Constructor and Description |
|---|
ClassPerplexity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appliesToNominalClass()
Returns true.
|
boolean |
appliesToNumericClass()
Returns false.
|
String |
getMetricDescription()
Get a short description of this metric.
|
String |
getMetricName()
Get the name of this metric.
|
double |
getStatistic(String statName)
Get the value of the named statistic, should be "Class perplexity".
|
List<String> |
getStatisticNames()
Get a list with the name of the metric.
|
boolean |
statisticIsMaximisable(String statName)
Returns true.
|
String |
toSummaryString()
Returns a formatted string (suitable for displaying in console or GUI output) containing this metric.
|
void |
updateStatsForClassifier(double[] predictedDistribution,
Instance instance)
Not used.
|
void |
updateStatsForConditionalDensityEstimator(ConditionalDensityEstimator classifier,
Instance classMissing,
double classValue)
Not used.
|
void |
updateStatsForPredictor(double predictedValue,
Instance instance)
Not used.
|
getPluginMetrics, setBaseEvaluationpublic static String METRIC_NAME
public String toSummaryString()
toSummaryString in interface InformationTheoreticEvaluationMetricpublic boolean appliesToNominalClass()
appliesToNominalClass in class AbstractEvaluationMetricpublic boolean appliesToNumericClass()
appliesToNumericClass in class AbstractEvaluationMetricpublic boolean statisticIsMaximisable(String statName)
statisticIsMaximisable in class AbstractEvaluationMetricpublic String getMetricName()
getMetricName in class AbstractEvaluationMetricpublic String getMetricDescription()
getMetricDescription in class AbstractEvaluationMetricpublic List<String> getStatisticNames()
getStatisticNames in class AbstractEvaluationMetricpublic double getStatistic(String statName)
getStatistic in class AbstractEvaluationMetricstatName - the only valid statistic is "Class perplexity"AbstractEvaluationMetric.UnknownStatisticException - if the statistic name is not "Class perplexity"public void updateStatsForClassifier(double[] predictedDistribution,
Instance instance)
throws Exception
InformationTheoreticEvaluationMetric
interface, but not implemented.updateStatsForClassifier in interface InformationTheoreticEvaluationMetricExceptionpublic void updateStatsForPredictor(double predictedValue,
Instance instance)
throws Exception
InformationTheoreticEvaluationMetric
interface, but not implemented.updateStatsForPredictor in interface InformationTheoreticEvaluationMetricExceptionpublic void updateStatsForConditionalDensityEstimator(ConditionalDensityEstimator classifier, Instance classMissing, double classValue) throws Exception
InformationTheoreticEvaluationMetric
interface, but not implemented.updateStatsForConditionalDensityEstimator in interface InformationTheoreticEvaluationMetricException