Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.classifier
Class MeasureParameters

    java.lang.Object
      de.jstacs.parameters.Parameter
          de.jstacs.parameters.CollectionParameter
              de.jstacs.parameters.MultiSelectionCollectionParameter
                  de.jstacs.classifier.MeasureParameters

All Implemented Interfaces:
  Rangeable, RangeIterator, Storable, Cloneable

    public final class MeasureParameters

extends MultiSelectionCollectionParameter

This class holds the parameters for the `evaluate`-methods of a classifier.

Author:
  Jan Grau, Jens Keilwagen
See Also:
  `AbstractClassifier.evaluate(MeasureParameters, boolean, de.jstacs.data.Sample...)`, `AbstractClassifier.evaluateAll(MeasureParameters, boolean, de.jstacs.data.Sample...)`

Nested Class Summary
`static class` | `MeasureParameters.Measure` This `enum` defines all measures that are currently implemented in Jstacs.

Nested classes/interfaces inherited from class de.jstacs.parameters.CollectionParameter
`CollectionParameter.InconsistentCollectionException`

Field Summary

Fields inherited from class de.jstacs.parameters.CollectionParameter
`errorMessage, parameters, userSelected`

Fields inherited from class de.jstacs.parameters.Parameter
`neededReference, neededReferenceId, parent`

Constructor Summary
`MeasureParameters(boolean evaluateAll)` Creates a new empty instance of `MeasureParameters`.
`MeasureParameters(boolean evaluateAll, double sp, double snForFPR, double snForPPV)` Creates a new instance of `MeasureParameters`.
`MeasureParameters(boolean evaluateAll, double sp, double snForFPR, double snForPPV, double minSpec, double maxSpec, int steps, RangeParameter.Scale scale)` Creates a new instance of `MeasureParameters`.
`MeasureParameters(StringBuffer representation)` The standard constructor for the interface `Storable`.

Method Summary
`void` | `deselectAll()` Deselects all measures, i.e. calls `setSelected(Measure, boolean)` for all `MeasureParameters.Measure`s.
`LinkedList<Result>` | `getAnnotation()` Returns the selected parameters and their values as a `LinkedList` of `Result`s.
`boolean` | `isSelected(MeasureParameters.Measure sel)` Indicates if the option `sel` is selected.
`void` | `setSelected(MeasureParameters.Measure sel, boolean b)` Selects or deselects an option `sel` depending on the new selection `b`.

Methods inherited from class de.jstacs.parameters.MultiSelectionCollectionParameter
`checkValue, clone, fromXML, getNumberOfNexts, getNumberOfValues, getSelected, getValue, getValueFor, getValueFor, getValues, hasDefaultOrIsSet, isAtomic, isRanged, isSelected, isSelected, isSet, next, reset, resetToFirst, setDefault, setSelected, setSelected, setValue, simplify, toXML, valuesToString`

Methods inherited from class de.jstacs.parameters.CollectionParameter
`appendCollection, createParameterSet, equals, extractCollection, getComment, getDatatype, getDefault, getErrorMessage, getName, getParametersInCollection, getRangedInstance, hasDefault, isRangeable, isRequired, isUserSelected, setRangeable, toString`

Methods inherited from class de.jstacs.parameters.Parameter
`getId, getNeededReference, getNeededReferenceId, getParent, setNeededReference, setParent`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MeasureParameters

    public MeasureParameters(boolean evaluateAll)
                      throws ParameterException

  Creates a new empty instance of `MeasureParameters`.

  Parameters:
    `evaluateAll` - indicates if the instance contains the parameters for the method `AbstractClassifier.evaluateAll(MeasureParameters, boolean, de.jstacs.data.Sample...)` or only the parameters for the method `AbstractClassifier.evaluate(MeasureParameters, boolean, de.jstacs.data.Sample...)`
  Throws:
    `ParameterException` - if something went wrong while constructing the parameters
  See Also:
    `MeasureParameters.Measure`, `MultiSelectionCollectionParameter.MultiSelectionCollectionParameter(DataType, String[], Object[], String[], String, String, boolean)`

### MeasureParameters

    public MeasureParameters(boolean evaluateAll,
                             double sp,
                             double snForFPR,
                             double snForPPV)
                      throws ParameterException

  Creates a new instance of `MeasureParameters`. All measures are switched on and the parameters of specificity and sensitivity are set to the given values.

  Parameters:
    `evaluateAll` - indicates if the instance contains the parameters for the method `AbstractClassifier.evaluateAll(MeasureParameters, boolean, de.jstacs.data.Sample...)` or only the parameters for the method `AbstractClassifier.evaluate(MeasureParameters, boolean, de.jstacs.data.Sample...)`
    `sp` - the (fixed) specificity
    `snForFPR` - the (fixed) sensitivity for the FPR
    `snForPPV` - the (fixed) sensitivity for the PPV
  Throws:
    `ParameterException` - if something went wrong while constructing the parameters
  See Also:
    `MeasureParameters.Measure`, `MultiSelectionCollectionParameter.MultiSelectionCollectionParameter(DataType, String[], Object[], String[], String, String, boolean)`

### MeasureParameters

    public MeasureParameters(boolean evaluateAll,
                             double sp,
                             double snForFPR,
                             double snForPPV,
                             double minSpec,
                             double maxSpec,
                             int steps,
                             RangeParameter.Scale scale)
                      throws ParameterException

  Creates a new instance of `MeasureParameters`. All measures are switched on and the parameters of specificity and sensitivity are set to the given values.

  Parameters:
    `evaluateAll` - indicates if the instance contains the parameters for the method `AbstractClassifier.evaluateAll(MeasureParameters, boolean, de.jstacs.data.Sample...)` or only the parameters for the method `AbstractClassifier.evaluate(MeasureParameters, boolean, de.jstacs.data.Sample...)`
    `sp` - the (fixed) specificity
    `snForFPR` - the (fixed) sensitivity for the FPR
    `snForPPV` - the (fixed) sensitivity for the PPV
    `minSpec` - only used for `MeasureParameters.Measure.PartialROCCurve`: the minimal specificity
    `maxSpec` - only used for `MeasureParameters.Measure.PartialROCCurve`: the maximal specificity
    `steps` - only used for `MeasureParameters.Measure.PartialROCCurve`: the number of steps
    `scale` - only used for `MeasureParameters.Measure.PartialROCCurve`: see `RangeParameter`
  Throws:
    `ParameterException` - if something went wrong while constructing the parameters
  See Also:
    `RangeParameter.Scale`, `MeasureParameters.Measure`, `RangeParameter`, `MultiSelectionCollectionParameter.MultiSelectionCollectionParameter(DataType, String[], Object[], String[], String, String, boolean)`

### MeasureParameters

    public MeasureParameters(StringBuffer representation)
                      throws NonParsableException

  The standard constructor for the interface `Storable`. Creates a new instance of `MeasureParameters` out of its XML representation.

  Parameters:
    `representation` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `MeasureParameters` could not be reconstructed out of the XML representation (the `StringBuffer` `representation` could not be parsed)
  See Also:
    `MultiSelectionCollectionParameter.MultiSelectionCollectionParameter(StringBuffer)`, `Storable`

Method Detail

### setSelected

    public void setSelected(MeasureParameters.Measure sel,
                            boolean b)

  Selects or deselects an option `sel` depending on the new selection `b`.

  Parameters:
    `sel` - the option
    `b` - the new selection
  See Also:
    `MultiSelectionCollectionParameter.setSelected(String, boolean)`

### isSelected

    public boolean isSelected(MeasureParameters.Measure sel)

  Indicates if the option `sel` is selected.

  Parameters:
    `sel` - the option
  Returns:
    `true` if the option `sel` is selected, `false` otherwise
  See Also:
    `MultiSelectionCollectionParameter.isSelected(String)`

### deselectAll

    public void deselectAll()

  Deselects all measures, i.e. calls `setSelected(Measure, boolean)` for all `MeasureParameters.Measure`s.

  See Also:
    `setSelected(Measure, boolean)`

### getAnnotation

    public LinkedList<Result> getAnnotation()

  Returns the selected parameters and their values as a `LinkedList` of `Result`s.

  Returns:
    a `LinkedList` of all selected parameters and their values

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD