org.aksw.commons.util
Class Statistic

java.lang.Object
  extended by org.aksw.commons.util.Statistic

public class Statistic
extends Object

The class Statistic contains methods for performing basic statistic operations such as the fScore.

Author:
Konrad Höffner

Constructor Summary
Statistic()
           
 
Method Summary
static double fScore(double precision, double recall, double beta)
          Calculates the f score of a precision-recall-pair where the parameter beta controls the weighing of precision against recall (use 1.0 for the original f or f1-score with equal weights).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistic

public Statistic()
Method Detail

fScore

public static double fScore(double precision,
                            double recall,
                            double beta)
Calculates the f score of a precision-recall-pair where the parameter beta controls the weighing of precision against recall (use 1.0 for the original f or f1-score with equal weights). See also http://en.wikipedia.org/wiki/F_score.

Parameters:
precision - the fraction of retrieved instances that are relevant
recall - the fraction of relevant instances that are retrieved
beta - A value of 1.0 means equal weights. Higher weights of precision are achieved by using a smaller value of beta, this is for example useful for semantic web owl:sameAs links. Higher weights of recall are achieved by bigger values of beta.
Returns:
the resulting f score


Copyright © 2012. All Rights Reserved.