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.scoringFunctionBased.sampling
Class SamplingScoreBasedClassifierParameterSet

    java.lang.Object
      de.jstacs.parameters.ParameterSet
          de.jstacs.parameters.InstanceParameterSet
              de.jstacs.parameters.SequenceScoringParameterSet
                  de.jstacs.classifier.scoringFunctionBased.sampling.SamplingScoreBasedClassifierParameterSet

All Implemented Interfaces:
  GalaxyConvertible, RangeIterator, Storable, Cloneable

Direct Known Subclasses:
  SamplingGenDisMixClassifierParameterSet

    public abstract class SamplingScoreBasedClassifierParameterSet

extends SequenceScoringParameterSet

`ParameterSet` to instantiate a `SamplingScoreBasedClassifier`.

Author:
  Jan Grau

Nested Class Summary

Nested classes/interfaces inherited from class de.jstacs.parameters.ParameterSet
`ParameterSet.ParameterList`

Field Summary

Fields inherited from class de.jstacs.parameters.SequenceScoringParameterSet
`alphabet, length`

Fields inherited from class de.jstacs.parameters.ParameterSet
`errorMessage, parameters, parent, ranged`

Constructor Summary
`SamplingScoreBasedClassifierParameterSet(Class<? extends SamplingScoreBasedClassifier> instanceClass, AlphabetContainer alphabet, int length, int numStarts, int testSamplings, int stationarySamplings, String outfilePrefix)` Create a new `SamplingScoreBasedClassifierParameterSet` with a grouped sampling scheme, sampling all parameters (and not only the free ones), and adaption of the variance.
`SamplingScoreBasedClassifierParameterSet(Class<? extends SamplingScoreBasedClassifier> instanceClass, AlphabetContainer alphabet, int length, int numStarts, SamplingScoreBasedClassifier.SamplingScheme scheme, int testSamplings, int stationarySamplings, boolean freeParameters, boolean adaptVariance, String outfilePrefix)` Create a new `SamplingScoreBasedClassifierParameterSet`.

Method Summary
`SamplingScoreBasedClassifierParameterSet` | `clone()` Creates a full clone (deep copy) of this `ParameterSet`.
`boolean` | `getAdaptVariance()` Returns true if the sampling variance shall be adapted to the size of the event space of a random variable
`boolean` | `getFreeParameters()` Returns `true` if only free parameters shall be used
`int` | `getNumberOfStarts()` Returns the number of independent sampling starts
`int` | `getNumberOfStationarySamplings()` Returns the number of samplings steps in the stationary phase
`int` | `getNumberOfTestSamplings()` Returns the number of samplings between checks for the stationary phase
`String` | `getOutfilePrefix()` Returns the prefix of the temporary files for storing sampled parameter values
`SamplingScoreBasedClassifier.SamplingScheme` | `getSamplingScheme()` Returns the sampling scheme
`protected void` | `loadParameters()` Loads the parameters for this `ParameterSet`.
`void` | `setNumberOfStarts(int i)` Sets the number of starts to `i`

Methods inherited from class de.jstacs.parameters.SequenceScoringParameterSet
`equals, fromXML, getAlphabetContainer, getLength, getNumberOfParameters, getParameterAt, hasDefaultOrIsSet, replaceParametersWithRangedInstance, reset, toXML`

Methods inherited from class de.jstacs.parameters.InstanceParameterSet
`getInstance, getInstanceClass, getInstanceComment, getInstanceName`

Methods inherited from class de.jstacs.parameters.ParameterSet
`fromGalaxy, getErrorMessage, getId, getIndex, getNumberOfValues, getParent, initParameterList, initParameterList, isAtomic, isRanged, makeRanged, next, parametersLoaded, propagateId, recieveId, resetToFirst, setParent, simplify, toGalaxy, valuesToString`

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

Constructor Detail

### SamplingScoreBasedClassifierParameterSet

    public SamplingScoreBasedClassifierParameterSet(Class<? extends SamplingScoreBasedClassifier> instanceClass,
                                                    AlphabetContainer alphabet,
                                                    int length,
                                                    int numStarts,
                                                    SamplingScoreBasedClassifier.SamplingScheme scheme,
                                                    int testSamplings,
                                                    int stationarySamplings,
                                                    boolean freeParameters,
                                                    boolean adaptVariance,
                                                    String outfilePrefix)
                                             throws Exception

  Create a new `SamplingScoreBasedClassifierParameterSet`.

  Parameters:
    `instanceClass` - the class, which must be a subclass of `SamplingScoreBasedClassifier`
    `alphabet` - the alphabet of the classifier
    `length` - the length of the sequences that can be classified
    `numStarts` - the number of independent samplings
    `scheme` - the sampling scheme
    `testSamplings` - the number of samplings between checks for the lenght of the burn-in phase
    `stationarySamplings` - the number of samplings in the stationary phase
    `freeParameters` - if only free parameters shall be used
    `adaptVariance` - if the variance shall be adapted to the size of the event space of a random variable
    `outfilePrefix` - the prefix of the temporary files for storing the parameters
  Throws:
    `Exception` - if the parameters could not be created
  See Also:
    `SamplingScoreBasedClassifier`

### SamplingScoreBasedClassifierParameterSet

    public SamplingScoreBasedClassifierParameterSet(Class<? extends SamplingScoreBasedClassifier> instanceClass,
                                                    AlphabetContainer alphabet,
                                                    int length,
                                                    int numStarts,
                                                    int testSamplings,
                                                    int stationarySamplings,
                                                    String outfilePrefix)
                                             throws Exception

  Create a new `SamplingScoreBasedClassifierParameterSet` with a grouped sampling scheme, sampling all parameters (and not only the free ones), and adaption of the variance.

  Parameters:
    `instanceClass` - the class, which must be a subclass of `SamplingScoreBasedClassifier`
    `alphabet` - the alphabet of the classifier
    `length` - the length of the sequences that can be classified
    `numStarts` - the number of independent samplings
    `testSamplings` - the number of samplings between checks for the lenght of the burn-in phase
    `stationarySamplings` - the number of samplings in the stationary phase
    `outfilePrefix` - the prefix of the temporary files for storing the parameters
  Throws:
    `Exception` - if the parameters could not be created
  See Also:
    `SamplingScoreBasedClassifier`

Method Detail

### clone

    public SamplingScoreBasedClassifierParameterSet clone()
                                                   throws CloneNotSupportedException

  Description copied from class: `ParameterSet`
  Creates a full clone (deep copy) of this `ParameterSet`. As a convenience-method the user can use `fillWithStandardFieldsForClone(ParameterSet)` on a newly created instance of a subclass of `ParameterSet` to obtain a clone/copy of all standard member variables (those already defined in `ParameterSet`) in the passed `ParameterSet`. Using this method, the cloning process becomes merely three-step:
  - Create a new instance of your subclass of `ParameterSet`, most likely with an empty constructor or the one taking just the instance class.
  - Call `this.fillWithStandardFieldsForClone` on this instance.
  - Return the instance.
  This method fulfills the conventions of `Object`'s method `Object.clone()`.

  Overrides:
    `clone` in class `SequenceScoringParameterSet`
  Returns:
    a deep clone/copy of this `ParameterSet`
  Throws:
    `CloneNotSupportedException`

### loadParameters

    protected void loadParameters()
                           throws Exception

  Description copied from class: `ParameterSet`
  Loads the parameters for this `ParameterSet`. This is in most cases done by calling `ParameterSet.initParameterList()` or `ParameterSet.initParameterList(int)` to initialize `ParameterSet.parameters` and afterwards filling `ParameterSet.parameters` with instances of subclasses of `Parameter`.

  Specified by:
    `loadParameters` in class `ParameterSet`
  Throws:
    `Exception` - if the parameters could not be loaded
  See Also:
    `Parameter`, `ParameterSet.parameters`, `ParameterSet.initParameterList()`, `ParameterSet.initParameterList(int)`

### getNumberOfStarts

    public int getNumberOfStarts()

  Returns the number of independent sampling starts

  Returns:
    the number of starts

### getSamplingScheme

    public SamplingScoreBasedClassifier.SamplingScheme getSamplingScheme()

  Returns the sampling scheme

  Returns:
    the scheme

### getNumberOfTestSamplings

    public int getNumberOfTestSamplings()

  Returns the number of samplings between checks for the stationary phase

  Returns:
    te number of samplings

### getNumberOfStationarySamplings

    public int getNumberOfStationarySamplings()

  Returns the number of samplings steps in the stationary phase

  Returns:
    the number of steps

### getFreeParameters

    public boolean getFreeParameters()

  Returns `true` if only free parameters shall be used

  Returns:
    if only free parameters shall be used

### getAdaptVariance

    public boolean getAdaptVariance()

  Returns true if the sampling variance shall be adapted to the size of the event space of a random variable

  Returns:
    if the sampling variance shall be adapted
  See Also:
    `SamplingScoreBasedClassifier`

### getOutfilePrefix

    public String getOutfilePrefix()

  Returns the prefix of the temporary files for storing sampled parameter values

  Returns:
    the prefix

### setNumberOfStarts

    public void setNumberOfStarts(int i)
                           throws SimpleParameter.IllegalValueException

  Sets the number of starts to `i`

  Parameters:
    `i` - the new number of starts
  Throws:
    `SimpleParameter.IllegalValueException` - if this value is not allowed

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