de.fu_berlin.ties.eval
Interface FMetricsView

All Superinterfaces:
EvalInput, Storable
All Known Implementing Classes:
FMetrics, SummaryFMetrics

public interface FMetricsView
extends EvalInput, Storable

A read-only view of the evaluation results calculated by the FMetrics class and the underlying raw counts.

Version:
$Revision: 1.6 $, $Date: 2006/10/21 16:04:11 $, $Author: siefkes $
Author:
Christian Siefkes

Method Summary
 double getF1Measure()
          Returns the F-measure, setting alpha = 0.5 so P and R are weighted equal ("F1 measure").
 double getFMeasure(double alpha)
          Returns the F-measure: F = 1 / (alpha * (1/P) + (1-alpha) * (1/R)).
 double getPrecision()
          Returns the precision: P = tp / (tp + fp).
 double getRecall()
          Returns the recall: R = tp / (tp + fn).
 
Methods inherited from interface de.fu_berlin.ties.eval.EvalInput
getFalseNeg, getFalsePos, getTruePos
 
Methods inherited from interface de.fu_berlin.ties.io.Storable
storeFields
 

Method Detail

getF1Measure

double getF1Measure()
Returns the F-measure, setting alpha = 0.5 so P and R are weighted equal ("F1 measure"). F1 = (2 * P * R) / (P + R).

Returns:
the F1 measure; a value in the range from 0.0 to 1.0

getFMeasure

double getFMeasure(double alpha)
                   throws IllegalArgumentException
Returns the F-measure: F = 1 / (alpha * (1/P) + (1-alpha) * (1/R)).
F is defined to be 0 if P = 0 or R = 0.

Parameters:
alpha - a factor in the range from 0.0 to 1.0 defining the weighting of precision and recall
Returns:
the F-measure; a value in the range from 0.0 to 1.0
Throws:
IllegalArgumentException - if alpha is smaller than 0.0 or larger than 1.0

getPrecision

double getPrecision()
Returns the precision: P = tp / (tp + fp).

Returns:
the precision; a value in the range from 0.0 to 1.0

getRecall

double getRecall()
Returns the recall: R = tp / (tp + fn).

Returns:
the precision; a value in the range from 0.0 to 1.0


Copyright © 2003-2007 Christian Siefkes. All Rights Reserved.