de.jstacs.classifiers.differentiableSequenceScoreBased.sampling
Class SamplingScoreBasedClassifierParameterSet

java.lang.Object
  extended by de.jstacs.parameters.ParameterSet
      extended by de.jstacs.parameters.InstanceParameterSet<T>
          extended by de.jstacs.parameters.SequenceScoringParameterSet
              extended by de.jstacs.classifiers.differentiableSequenceScoreBased.sampling.SamplingScoreBasedClassifierParameterSet
All Implemented Interfaces:
GalaxyConvertible, 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
 
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
 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, reset, toXML
 
Methods inherited from class de.jstacs.parameters.InstanceParameterSet
getInstance, getInstanceClass, getInstanceComment, getInstanceName
 
Methods inherited from class de.jstacs.parameters.ParameterSet
fromGalaxy, getAllParameterNames, getComment, getComment, getErrorMessage, getIndex, getName, getName, getParameterForName, getParent, initParameterList, initParameterList, isAtomic, isComparable, parametersLoaded, setParent, toGalaxy
 
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 length 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 length 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:
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

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