de.jstacs.classifiers.differentiableSequenceScoreBased
Class ScoreClassifierParameterSet

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.ScoreClassifierParameterSet
All Implemented Interfaces:
GalaxyConvertible, Storable, Cloneable
Direct Known Subclasses:
GenDisMixClassifierParameterSet

public abstract class ScoreClassifierParameterSet
extends SequenceScoringParameterSet

A set of Parameters for any ScoreClassifier.

Author:
Jens Keilwagen

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
ScoreClassifierParameterSet(Class<? extends ScoreClassifier> instanceClass, AlphabetContainer alphabet, int length, byte algo, AbstractTerminationCondition tc, double lineps, double startD, boolean free, OptimizableFunction.KindOfParameter kind)
          The constructor for a simple, instantiated parameter set.
ScoreClassifierParameterSet(Class<? extends ScoreClassifier> instanceClass, AlphabetContainer alphabet, int length, byte algo, double eps, double lineps, double startD, boolean free, OptimizableFunction.KindOfParameter kind)
          The constructor for a simple, instantiated parameter set.
ScoreClassifierParameterSet(Class<? extends ScoreClassifier> instanceClass, boolean simple, AlphabetContainer.AlphabetContainerType type, boolean variableLength)
          Creates a new ScoreClassifierParameterSet with empty parameter values.
ScoreClassifierParameterSet(StringBuffer xml)
          The standard constructor for the interface Storable.
 
Method Summary
 String getInstanceComment()
          Returns a comment (a textual description) of the class that can be constructed using this ParameterSet.
 String getInstanceName()
          Returns the name of an instance of the class that can be constructed using this ParameterSet.
 AbstractTerminationCondition getTerminantionCondition()
          This method returns the AbstractTerminationCondition for stopping the training, e.g., if the difference of the scores between two iterations is smaller than a given threshold the training is stopped.
 boolean useOnlyFreeParameter()
          This method indicates if only the free parameters shall be used.
 
Methods inherited from class de.jstacs.parameters.SequenceScoringParameterSet
clone, equals, fromXML, getAlphabetContainer, getLength, getNumberOfParameters, getParameterAt, hasDefaultOrIsSet, reset, toXML
 
Methods inherited from class de.jstacs.parameters.InstanceParameterSet
getInstance, getInstanceClass
 
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

ScoreClassifierParameterSet

public ScoreClassifierParameterSet(Class<? extends ScoreClassifier> instanceClass,
                                   boolean simple,
                                   AlphabetContainer.AlphabetContainerType type,
                                   boolean variableLength)
                            throws Exception
Creates a new ScoreClassifierParameterSet with empty parameter values.

Parameters:
instanceClass - the class of the instance
simple - indicates whether the AlphabetContainer shall be simple
type - the type of the AlphabetContainer
variableLength - indicates whether the corresponding classifier can handle sequences of arbitrary length
Throws:
Exception - if the parameters could not be loaded
See Also:
SequenceScoringParameterSet.SequenceScoringParameterSet(Class, de.jstacs.data.AlphabetContainer.AlphabetContainerType, boolean, boolean)

ScoreClassifierParameterSet

public ScoreClassifierParameterSet(StringBuffer xml)
                            throws NonParsableException
The standard constructor for the interface Storable. Creates a new ScoreClassifierParameterSet out of its XML representation.

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

ScoreClassifierParameterSet

public ScoreClassifierParameterSet(Class<? extends ScoreClassifier> instanceClass,
                                   AlphabetContainer alphabet,
                                   int length,
                                   byte algo,
                                   double eps,
                                   double lineps,
                                   double startD,
                                   boolean free,
                                   OptimizableFunction.KindOfParameter kind)
                            throws Exception
The constructor for a simple, instantiated parameter set.

Parameters:
instanceClass - the class of the instance
alphabet - the alphabet
length - the length of the sequences, 0 for homogeneous
algo - the choice of algorithm
eps - the threshold for stopping the algorithm
lineps - the threshold for stopping the line search in the algorithm
startD - the start distance for the line search in the algorithm
free - indicates whether only the free parameters or all parameters should be used
kind - indicates the kind of class parameter initialization
Throws:
Exception - if something went wrong
See Also:
SequenceScoringParameterSet.SequenceScoringParameterSet(Class, AlphabetContainer, int, boolean), ScoreClassifierParameterSet(Class, AlphabetContainer, int, byte, AbstractTerminationCondition, double, double, boolean, de.jstacs.classifiers.differentiableSequenceScoreBased.OptimizableFunction.KindOfParameter), SmallDifferenceOfFunctionEvaluationsCondition

ScoreClassifierParameterSet

public ScoreClassifierParameterSet(Class<? extends ScoreClassifier> instanceClass,
                                   AlphabetContainer alphabet,
                                   int length,
                                   byte algo,
                                   AbstractTerminationCondition tc,
                                   double lineps,
                                   double startD,
                                   boolean free,
                                   OptimizableFunction.KindOfParameter kind)
                            throws Exception
The constructor for a simple, instantiated parameter set.

Parameters:
instanceClass - the class of the instance
alphabet - the alphabet
length - the length of the sequences, 0 for homogeneous
algo - the choice of algorithm
tc - the termination condition for stopping the algorithm
lineps - the threshold for stopping the line search in the algorithm
startD - the start distance for the line search in the algorithm
free - indicates whether only the free parameters or all parameters should be used
kind - indicates the kind of class parameter initialization
Throws:
Exception - if something went wrong
See Also:
SequenceScoringParameterSet.SequenceScoringParameterSet(Class, AlphabetContainer, int, boolean)
Method Detail

useOnlyFreeParameter

public boolean useOnlyFreeParameter()
This method indicates if only the free parameters shall be used.

Returns:
true if only the free parameters shall be used, false otherwise

getInstanceName

public String getInstanceName()
Description copied from class: InstanceParameterSet
Returns the name of an instance of the class that can be constructed using this ParameterSet.

Specified by:
getInstanceName in class InstanceParameterSet
Returns:
the name of the class

getInstanceComment

public String getInstanceComment()
Description copied from class: InstanceParameterSet
Returns a comment (a textual description) of the class that can be constructed using this ParameterSet.

Specified by:
getInstanceComment in class InstanceParameterSet
Returns:
the comment of the class

getTerminantionCondition

public AbstractTerminationCondition getTerminantionCondition()
                                                      throws ParameterSetParser.NotInstantiableException
This method returns the AbstractTerminationCondition for stopping the training, e.g., if the difference of the scores between two iterations is smaller than a given threshold the training is stopped.

Returns:
the AbstractTerminationCondition for stopping the training
Throws:
ParameterSetParser.NotInstantiableException - if the AbstractTerminationCondition could not be created from its ParameterSet