de.jstacs.classifiers.performanceMeasures
Class MaximumFMeasure
java.lang.Object
de.jstacs.parameters.ParameterSet
de.jstacs.classifiers.performanceMeasures.AbstractPerformanceMeasure
de.jstacs.classifiers.performanceMeasures.TwoClassAbstractPerformanceMeasure
de.jstacs.classifiers.performanceMeasures.MaximumNumericalTwoClassMeasure
de.jstacs.classifiers.performanceMeasures.MaximumFMeasure
- All Implemented Interfaces:
- NumericalPerformanceMeasure, GalaxyConvertible, Storable, Cloneable
public class MaximumFMeasure
- extends MaximumNumericalTwoClassMeasure
Computes the maximum of the general F-measure given a positive real parameter
.
The F-measure is defined as
, where PPV denotes the
positive predictive value and Sn denotes sensitivity. For
it is equal to the traditional F1-measure.
- Author:
- Jens Keilwagen
- See Also:
PositivePredictiveValueForFixedSensitivity,
SensitivityForFixedSpecificity
|
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.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 |
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
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 positivesfp - false positivesfn - false negativestn - true negative
- Returns:
- the value of the measure