/** * Get the value of a plugin metric * * @param m the metric to get the value from * @param statName the name of the statistic to get the value of * @param classValIndex the optional class value index * @return the value of the metric * @throws Exception if a problem occurs */ protected double getPluginMetricValue(AbstractEvaluationMetric m, String statName, int... classValIndex) throws Exception { boolean hasValIndex = classValIndex != null && classValIndex.length == 1; if (m instanceof InformationRetrievalEvaluationMetric) { return hasValIndex ? ((InformationRetrievalEvaluationMetric) m) .getStatistic(statName, classValIndex[0]) : ((InformationRetrievalEvaluationMetric) m) .getClassWeightedAverageStatistic(statName); } return m.getStatistic(statName); }
predictedDistribution, instance); } else if (m instanceof InformationRetrievalEvaluationMetric) { ((InformationRetrievalEvaluationMetric) m).updateStatsForClassifier( predictedDistribution, instance); } else if (m instanceof InformationTheoreticEvaluationMetric) {
predictedDistribution, instance); } else if (m instanceof InformationRetrievalEvaluationMetric) { ((InformationRetrievalEvaluationMetric) m).updateStatsForClassifier( predictedDistribution, instance); } else if (m instanceof InformationTheoreticEvaluationMetric) {
/** * Get the value of a plugin metric * * @param m the metric to get the value from * @param statName the name of the statistic to get the value of * @param classValIndex the optional class value index * @return the value of the metric * @throws Exception if a problem occurs */ protected double getPluginMetricValue(AbstractEvaluationMetric m, String statName, int... classValIndex) throws Exception { boolean hasValIndex = classValIndex != null && classValIndex.length == 1; if (m instanceof InformationRetrievalEvaluationMetric) { return hasValIndex ? ((InformationRetrievalEvaluationMetric) m) .getStatistic(statName, classValIndex[0]) : ((InformationRetrievalEvaluationMetric) m) .getClassWeightedAverageStatistic(statName); } return m.getStatistic(statName); }
if (m_metricsToDisplay.contains(name.toLowerCase())) { double stat = ((InformationRetrievalEvaluationMetric) m).getStatistic( name, i); if (name.length() < 7) { double stat = ((InformationRetrievalEvaluationMetric) m) .getClassWeightedAverageStatistic(name); if (name.length() < 7) { name = Utils.padRight(name, 7);
if (m_metricsToDisplay.contains(name.toLowerCase())) { double stat = ((InformationRetrievalEvaluationMetric) m).getStatistic( name, i); if (name.length() < 7) { double stat = ((InformationRetrievalEvaluationMetric) m) .getClassWeightedAverageStatistic(name); if (name.length() < 7) { name = Utils.padRight(name, 7);
evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric) .getClassWeightedAverageStatistic(statName); } else { evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric).getStatistic( statName, m_IRClassVal);
evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric) .getClassWeightedAverageStatistic(statName); } else { evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric).getStatistic( statName, m_IRClassVal);
evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric) .getClassWeightedAverageStatistic(statName); } else { evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric).getStatistic( statName, m_IRClassVal);
if (m_IRClassVal < 0) { repError[i] = ((InformationRetrievalEvaluationMetric) pluginMetric) .getClassWeightedAverageStatistic(statName); } else { repError[i] = ((InformationRetrievalEvaluationMetric) pluginMetric) .getStatistic(statName, m_IRClassVal);
if (m_IRClassVal < 0) { repError[i] = ((InformationRetrievalEvaluationMetric) pluginMetric) .getClassWeightedAverageStatistic(statName); } else { repError[i] = ((InformationRetrievalEvaluationMetric) pluginMetric) .getStatistic(statName, m_IRClassVal);
evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric) .getClassWeightedAverageStatistic(statName); } else { evalMetric = ((InformationRetrievalEvaluationMetric) pluginMetric).getStatistic( statName, m_IRClassVal);