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 `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)` This constructor creates a new empty instance of `MeasureParameters`.
`MeasureParameters(boolean evaluateAll, double sp, double snForFPR, double snForPPV)` This constructor creates a new instance of `MeasureParameters`.
`MeasureParameters(boolean evaluateAll, double sp, double snForFPR, double snForPPV, double minSpec, double maxSpec, int steps, RangeParameter.Scale scale)`
`MeasureParameters(StringBuffer representation)` Recreates a `MeasureParameters` instance from its XML representation as returned by `MultiSelectionCollectionParameter.toXML()`.

Method Summary
`void` | `deselectAll()` De-selects 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 list of results.
`boolean` | `isSelected(MeasureParameters.Measure sel)` Returns `true` if the option `sel` is selected.
`void` | `setSelected(MeasureParameters.Measure sel, boolean b)` Selects or de-selects the option `sel` depending on `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`

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, toString, wait, wait, wait`

Constructor Detail

### MeasureParameters

    public MeasureParameters(boolean evaluateAll)
                      throws ParameterException

  This constructor creates a new empty instance of `MeasureParameters`.

  Parameters:
    `evaluateAll` - if `true` the instance contains the parameters for the `evaluateAll`-method, otherwise it only contains the parameters for the `evaluate`-method
  Throws:
    `ParameterException` - if something went wrong while constructing the parameters

### MeasureParameters

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

  This constructor creates a new instance of `MeasureParameters`. All measure are switched on and the parameters of specificity and sensitivity are set to the given values.

  Parameters:
    `evaluateAll` - if `true` the instance contains the parameters for the `evaluateAll`-method, otherwise it only contains the parameters for the `evaluate`-method
    `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

### MeasureParameters

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

Parameters:
  `evaluateAll` - if `true` the instance contains the parameters for the `evaluateAll`-method, otherwise it only contains the parameters for the `evaluate`-method
  `sp` - the (fixed) specificity
  `snForFPR` - the (fixed) sensitivity for the FPR
  `snForPPV` - the (fixed) sensitivity for the PPV
  `minSpec` - the minimal specificity
  `maxSpec` - the maximal specificity
  `steps` - the number of steps
  `scale` - see `RangeParameter`
Throws:
  `ParameterException` - if something went wrong while constructing the parameters
See Also:
  `RangeParameter.Scale`

### MeasureParameters

    public MeasureParameters(StringBuffer representation)
                      throws NonParsableException

  Recreates a `MeasureParameters` instance from its XML representation as returned by `MultiSelectionCollectionParameter.toXML()`.

  Parameters:
    `representation` - the XML representation
  Throws:
    `NonParsableException` - is thrown if the XML code could not be parsed

Method Detail

### setSelected

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

  Selects or de-selects the option `sel` depending on `b`.

  Parameters:
    `sel` - the option
    `b` - the new selection

### isSelected

    public boolean isSelected(MeasureParameters.Measure sel)

  Returns `true` if the option `sel` is selected.

  Parameters:
    `sel` - the option
  Returns:
    if the option `sel` is selected

### deselectAll

    public void deselectAll()

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

### getAnnotation

    public LinkedList<Result> getAnnotation()

  Returns the selected parameters and their values as a list of results.

  Returns:
    a list 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