de.jstacs.classifiers.performanceMeasures
Class MaximumFMeasure

java.lang.Object
  extended by de.jstacs.parameters.ParameterSet
      extended by de.jstacs.classifiers.performanceMeasures.AbstractPerformanceMeasure
          extended by de.jstacs.classifiers.performanceMeasures.AbstractTwoClassPerformanceMeasure
              extended by de.jstacs.classifiers.performanceMeasures.AbstractNumericalTwoClassPerformanceMeasure
                  extended by de.jstacs.classifiers.performanceMeasures.MaximumNumericalTwoClassMeasure
                      extended by de.jstacs.classifiers.performanceMeasures.MaximumFMeasure
All Implemented Interfaces:
NumericalPerformanceMeasure, PerformanceMeasure, GalaxyConvertible, Storable, Cloneable

public class MaximumFMeasure
extends MaximumNumericalTwoClassMeasure

Computes the maximum of the general F-measure given a positive real parameter $\beta$. The F-measure is defined as $F_\beta = (1+\beta^2) \frac{PPV*Sn}{(\beta^2 PPV) + Sn}$, where PPV denotes the positive predictive value and Sn denotes sensitivity. For $\beta = 1$ it is equal to the traditional F1-measure.

Author:
Jens Keilwagen
See Also:
PositivePredictiveValueForFixedSensitivity, SensitivityForFixedSpecificity

Nested Class Summary
 
Nested classes/interfaces inherited from class de.jstacs.parameters.ParameterSet
ParameterSet.ParameterList
 
Field Summary
 
Fields inherited from class de.jstacs.parameters.ParameterSet
errorMessage, parameters, parent
 
Constructor Summary
MaximumFMeasure()
          Constructs a new instance of the performance measure MaximumFMeasure with empty parameters.
MaximumFMeasure(double beta)
          Constructs a new instance of the performance measure MaximumFMeasure with given beta.
MaximumFMeasure(StringBuffer xml)
          The standard constructor for the interface Storable.
 
Method Summary
protected  double getMeasure(double tp, double fp, double fn, double tn)
          This measure compute the measure for a given confusion matrix
protected  String getMeasureName()
          This method returns a short name of the measure without any parameters.
protected  String getSpecificName()
          This method returns a specific name of the measure including any parameters.
 
Methods inherited from class de.jstacs.classifiers.performanceMeasures.MaximumNumericalTwoClassMeasure
compute, getName
 
Methods inherited from class de.jstacs.classifiers.performanceMeasures.AbstractNumericalTwoClassPerformanceMeasure
compute, compute, compute
 
Methods inherited from class de.jstacs.classifiers.performanceMeasures.AbstractTwoClassPerformanceMeasure
getAllowedNumberOfClasses
 
Methods inherited from class de.jstacs.classifiers.performanceMeasures.AbstractPerformanceMeasure
findSplitIndex, findThreshold, getCollectionOfAllMeasures, getWeight, simpleWeights
 
Methods inherited from class de.jstacs.parameters.ParameterSet
clone, fromGalaxy, fromXML, getAllParameterNames, getComment, getComment, getErrorMessage, getIndex, getName, getName, getNumberOfParameters, getParameterAt, getParameterForName, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isComparable, parametersLoaded, reset, setParent, toGalaxy, toXML
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jstacs.classifiers.performanceMeasures.PerformanceMeasure
getAllowedNumberOfClasses
 

Constructor Detail

MaximumFMeasure

public MaximumFMeasure()
Constructs a new instance of the performance measure MaximumFMeasure with empty parameters.


MaximumFMeasure

public MaximumFMeasure(double beta)
                throws Exception
Constructs a new instance of the performance measure MaximumFMeasure with given beta.

Parameters:
beta - the beta for which the maximum F-measure should be computed
Throws:
Exception - if the internal parameters can not be created or the value can not be set

MaximumFMeasure

public MaximumFMeasure(StringBuffer xml)
                throws NonParsableException
The standard constructor for the interface Storable. Constructs a MaximumFMeasure out of an XML representation.

Parameters:
xml - the XML representation as StringBuffer
Throws:
NonParsableException - if the MaximumFMeasure could not be reconstructed out of the StringBuffer xml
Method Detail

getMeasureName

protected String getMeasureName()
Description copied from class: MaximumNumericalTwoClassMeasure
This method returns a short name of the measure without any parameters.

Specified by:
getMeasureName in class MaximumNumericalTwoClassMeasure
Returns:
a short name of the measure without any parameters

getSpecificName

protected String getSpecificName()
Description copied from class: MaximumNumericalTwoClassMeasure
This method returns a specific name of the measure including any parameters.

Specified by:
getSpecificName in class MaximumNumericalTwoClassMeasure
Returns:
a specific name of the measure including any parameters

getMeasure

protected double getMeasure(double tp,
                            double fp,
                            double fn,
                            double tn)
Description copied from class: MaximumNumericalTwoClassMeasure
This measure compute the measure for a given confusion matrix

Specified by:
getMeasure in class MaximumNumericalTwoClassMeasure
Parameters:
tp - true positives
fp - false positives
fn - false negatives
tn - true negative
Returns:
the value of the measure