public class Ema extends AbstractEvaluationMetric implements StandardEvaluationMetric, TechnicalInformationHandler
RemainingPerplexity
after the learning process
\[ EMA = \frac{1}{PP_{X|Y}} = \frac{1}{2^{H_{X|Y}}} \]
Its bounds are \( \frac{1}{PP_X} \leq EMA \leq 1 \), where \( PP_X \) is the ClassPerplexity
.
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.RemainingPerplexity
,
Evaluation
,
Serialized FormAbstractEvaluationMetric.UnknownStatisticException
Modifier and Type | Field and Description |
---|---|
static String |
METRIC_NAME
Constant string with the metric name
|
Constructor and Description |
---|
Ema() |
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 "EMA".
|
List<String> |
getStatisticNames()
Get a list with the name of the metric.
|
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.
|
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 |
updateStatsForPredictor(double predictedValue,
Instance instance)
Not used.
|
getPluginMetrics, setBaseEvaluation
public static String METRIC_NAME
public boolean appliesToNominalClass()
appliesToNominalClass
in class AbstractEvaluationMetric
public boolean appliesToNumericClass()
appliesToNumericClass
in class AbstractEvaluationMetric
public String getMetricDescription()
getMetricDescription
in class AbstractEvaluationMetric
public String getMetricName()
getMetricName
in class AbstractEvaluationMetric
public double getStatistic(String statName)
getStatistic
in class AbstractEvaluationMetric
statName
- the name of the statistic, should be "EMA"AbstractEvaluationMetric.UnknownStatisticException
- if the statistic name is not "EMA"public List<String> getStatisticNames()
getStatisticNames
in class AbstractEvaluationMetric
public String toSummaryString()
toSummaryString
in interface StandardEvaluationMetric
public boolean statisticIsMaximisable(String statName)
statisticIsMaximisable
in class AbstractEvaluationMetric
public void updateStatsForClassifier(double[] predictedDistribution, Instance instance) throws Exception
StandardEvaluationMetric
interface, but not implemented.updateStatsForClassifier
in interface StandardEvaluationMetric
Exception
public void updateStatsForPredictor(double predictedValue, Instance instance) throws Exception
StandardEvaluationMetric
interface, but not implemented.updateStatsForPredictor
in interface StandardEvaluationMetric
Exception
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler