|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.parameters.ParameterSet
de.jstacs.parameters.ExpandableParameterSet
de.jstacs.classifiers.performanceMeasures.AbstractPerformanceMeasureParameterSet<T>
T - the class of the PerformanceMeasure, typically NumericalPerformanceMeasure or PerformanceMeasurepublic class AbstractPerformanceMeasureParameterSet<T extends PerformanceMeasure>
This class implements a container of PerformanceMeasures that can be used
in AbstractClassifier.evaluate(AbstractPerformanceMeasureParameterSet, boolean, de.jstacs.data.DataSet...).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.jstacs.parameters.ParameterSet |
|---|
ParameterSet.ParameterList |
| Field Summary |
|---|
| Fields inherited from class de.jstacs.parameters.ExpandableParameterSet |
|---|
commentTemplate, nameTemplate, template |
| Fields inherited from class de.jstacs.parameters.ParameterSet |
|---|
errorMessage, parameters, parent |
| Constructor Summary | |
|---|---|
protected |
AbstractPerformanceMeasureParameterSet(int numClasses,
boolean numerical,
T[] measures)
Creates a new AbstractPerformanceMeasureParameterSet for the given number of classes and measures using only numerical
performance measures or not. |
protected |
AbstractPerformanceMeasureParameterSet(int numClasses,
SelectionParameter selection,
T... measures)
This constructor creates an instance with a given template selection that can be used for classifiers handling a given number of classes. |
|
AbstractPerformanceMeasureParameterSet(StringBuffer xml)
The standard constructor for the interface Storable. |
| Methods inherited from class de.jstacs.parameters.ExpandableParameterSet |
|---|
addParameterToSet, clone, fromGalaxy, fromXML, parameterRemovable, removeParameterFromSet, replaceContentWith, toGalaxy, toXML |
| Methods inherited from class de.jstacs.parameters.ParameterSet |
|---|
getAllParameterNames, getComment, getComment, getErrorMessage, getIndex, getName, getName, getNumberOfParameters, getParameterAt, getParameterForName, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isComparable, parametersLoaded, reset, setParent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPerformanceMeasureParameterSet(StringBuffer xml)
throws NonParsableException
Storable.
Constructs a AbstractPerformanceMeasureParameterSet out of an XML representation.
xml - the XML representation as StringBuffer
NonParsableException - if the AbstractPerformanceMeasureParameterSet could not be reconstructed out of
the StringBuffer xml
protected AbstractPerformanceMeasureParameterSet(int numClasses,
boolean numerical,
T[] measures)
throws Exception
AbstractPerformanceMeasureParameterSet for the given number of classes and measures using only numerical
performance measures or not.
numClasses - the number of classesnumerical - the information if all measures shall be NumericalPerformanceMeasuresmeasures - the measures
Exception - if something went wrong
protected AbstractPerformanceMeasureParameterSet(int numClasses,
SelectionParameter selection,
T... measures)
throws Exception
selection that can be used for classifiers handling a given number of classes.
Additional it allows to set some measure initially.
numClasses - the number of classesselection - the template that can be used to add an select performance measuresmeasures - the initially set measures
Exception - if the measures could not be set (e.g. number of classes differs, ...)| Method Detail |
|---|
protected static int getNumberOfClasses(PerformanceMeasure[] measures)
PerformanceMeasures in measures
can be applied to.
measures - the measures
public static NumericalPerformanceMeasureParameterSet createFilledParameters()
throws Exception
NumericalPerformanceMeasureParameterSet that can be used in
AbstractClassifier.evaluate(AbstractPerformanceMeasureParameterSet, boolean, de.jstacs.data.DataSet...)
or in a ClassifierAssessment.
NumericalPerformanceMeasureParameterSet
Exception - forwarded from createFilledParameters(boolean, double, double, double, double)
public static AbstractPerformanceMeasureParameterSet createFilledParameters(boolean numerical,
double spForSn,
double snForFPR,
double snForPPV,
double beta)
throws Exception
AbstractPerformanceMeasureParameterSet that can be used in
AbstractClassifier.evaluate(AbstractPerformanceMeasureParameterSet, boolean, de.jstacs.data.DataSet...).
If numerical = false, the parameter set also contains curve measures (e.g. PRCurve, ROCCurve).
numerical - if trueNumericalPerformanceMeasureParameterSet, otherwise AbstractPerformanceMeasureParameterSetspForSn - the specificity for computing the sensitivity (cf. SensitivityForFixedSpecificity)snForFPR - the specificity for computing the sensitivity (cf. FalsePositiveRateForFixedSensitivity)snForPPV - the specificity for computing the sensitivity (cf. PositivePredictiveValueForFixedSensitivity)beta - the beta of the F-measure (cf. MaximumFMeasure)
AbstractPerformanceMeasureParameterSet
Exception - if a performance measure could not be created properly (e.g. wrong parameters: sensitivity < 0, ...)
protected void setMeasure(T measure)
throws SimpleParameter.IllegalValueException
ParameterSetContainer.
measure - the measure to be computed
SimpleParameter.IllegalValueException - if the measure could not be set (forwarded from SelectionParameter.setValue(Object))public AbstractPerformanceMeasure removeMeasure(int index)
index from the set and returns this measure.
index - the index of the measure to be removed
public AbstractPerformanceMeasure[] removeMeasures(Class<? extends AbstractPerformanceMeasure> clazz)
clazz - the specific class
Object.equals(Object)public AbstractPerformanceMeasure[] removeMeasures(String name)
name - the specific name
AbstractPerformanceMeasure.getName(),
String.equals(Object)public AbstractPerformanceMeasure[] getAllMeasures()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||