|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.parameters.ParameterSet
de.jstacs.parameters.ExpandableParameterSet
de.jstacs.classifiers.performanceMeasures.PerformanceMeasureParameterSet
public class PerformanceMeasureParameterSet
This class implements a container of AbstractPerformanceMeasure
s that can be used
in AbstractClassifier.evaluate(PerformanceMeasureParameterSet, 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 | |
---|---|
|
PerformanceMeasureParameterSet()
Constructs a new PerformanceMeasureParameterSet that can be used for binary classifiers. |
|
PerformanceMeasureParameterSet(AbstractPerformanceMeasure... measures)
Constructs a new PerformanceMeasureParameterSet with the given performance measures. |
|
PerformanceMeasureParameterSet(int numClasses)
Constructs a new PerformanceMeasureParameterSet that can be used for classifiers that
handle the given number of classes. |
protected |
PerformanceMeasureParameterSet(int numClasses,
SelectionParameter selection,
AbstractPerformanceMeasure... measures)
This constructor creates an instance with a given template selection that can be used for classifiers handling a given number of classes. |
|
PerformanceMeasureParameterSet(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 PerformanceMeasureParameterSet(StringBuffer xml) throws NonParsableException
Storable
.
Constructs a PerformanceMeasureParameterSet
out of an XML representation.
xml
- the XML representation as StringBuffer
NonParsableException
- if the PerformanceMeasureParameterSet
could not be reconstructed out of
the StringBuffer
xml
public PerformanceMeasureParameterSet() throws Exception
PerformanceMeasureParameterSet
that can be used for binary classifiers.
Exception
- if something went wrongPerformanceMeasureParameterSet(int)
public PerformanceMeasureParameterSet(int numClasses) throws Exception
PerformanceMeasureParameterSet
that can be used for classifiers that
handle the given number of classes.
numClasses
- the number of classes
Exception
- if something went wrongAbstractClassifier.getNumberOfClasses()
,
PerformanceMeasureParameterSet(int, AbstractPerformanceMeasure...)
public PerformanceMeasureParameterSet(AbstractPerformanceMeasure... measures) throws Exception
PerformanceMeasureParameterSet
with the given performance measures.
The number of classes this PerformanceMeasureParameterSet
can be used for is determined from
the given AbstractPerformanceMeasure
s.
measures
- the AbstractPerformanceMeasure
that shall be used
Exception
- if something went wrongAbstractClassifier.getNumberOfClasses()
,
PerformanceMeasureParameterSet(int, SelectionParameter, AbstractPerformanceMeasure... )
,
AbstractPerformanceMeasure.getCollectionOfAllMeasures(int, boolean)
protected PerformanceMeasureParameterSet(int numClasses, SelectionParameter selection, AbstractPerformanceMeasure... 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 |
---|
public static NumericalPerformanceMeasureParameterSet createFilledParameters() throws Exception
NumericalPerformanceMeasureParameterSet
that can be used in
AbstractClassifier.evaluate(PerformanceMeasureParameterSet, boolean, de.jstacs.data.DataSet...)
or in a ClassifierAssessment
.
NumericalPerformanceMeasureParameterSet
Exception
- forwarded from createFilledParameters(boolean, double, double, double, double)
public static PerformanceMeasureParameterSet createFilledParameters(boolean numerical, double spForSn, double snForFPR, double snForPPV, double beta) throws Exception
PerformanceMeasureParameterSet
that can be used in
AbstractClassifier.evaluate(PerformanceMeasureParameterSet, boolean, de.jstacs.data.DataSet...)
.
If numerical = false
, the parameter set also contains curve measures (e.g. PRCurve
, ROCCurve
).
numerical
- if true
NumericalPerformanceMeasureParameterSet
, otherwise PerformanceMeasureParameterSet
spForSn
- 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
)
PerformanceMeasureParameterSet
Exception
- if a performance measure could not be created properly (e.g. wrong parameters: sensitivity < 0, ...)@Deprecated public void addMeasure(AbstractPerformanceMeasure measure) throws CloneNotSupportedException, SimpleParameter.IllegalValueException
measure
- the measure to be added
CloneNotSupportedException
- if the template could not be cloned (forwarded from ExpandableParameterSet.addParameterToSet()
SimpleParameter.IllegalValueException
- forwarded from setMeasure(AbstractPerformanceMeasure)
protected void setMeasure(AbstractPerformanceMeasure 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 All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |