de.jstacs.classifier.assessment
Class RepeatedSubSamplingAssessParameterSet

java.lang.Object
  extended by de.jstacs.parameters.ParameterSet
      extended by de.jstacs.classifier.assessment.ClassifierAssessmentAssessParameterSet
          extended by de.jstacs.classifier.assessment.RepeatedSubSamplingAssessParameterSet
All Implemented Interfaces:
RangeIterator, Storable, Cloneable

public class RepeatedSubSamplingAssessParameterSet
extends ClassifierAssessmentAssessParameterSet

This class implements a ClassifierAssessmentAssessParameterSet that must be used to call method assess() of a RepatedSubSamplingExperiment. It contains user-specific parameters necessary for a run of a RepeatedSubSamplingExperiment.

Author:
andr|e gohr (a0coder (nospam:@) gmail (nospam:.) com)

Nested Class Summary
 
Nested classes/interfaces inherited from class de.jstacs.parameters.ParameterSet
ParameterSet.ParameterList
 
Field Summary
 
Fields inherited from class de.jstacs.parameters.ParameterSet
alternativeInstanceClass, errorMessage, parameters, parent, ranged
 
Constructor Summary
  RepeatedSubSamplingAssessParameterSet()
          inherited from ClassifierAssessmentAssessParameterSet
protected RepeatedSubSamplingAssessParameterSet(Class alternativeInstanceClass)
          inherited from ClassifierAssessmentAssessParameterSet
  RepeatedSubSamplingAssessParameterSet(int elementLength, boolean exceptionIfMPNotComputable, int repeats, int[] trainNumbers, int[] testNumbers)
           
protected RepeatedSubSamplingAssessParameterSet(StringBuffer representation)
          inherited from ClassifierAssessmentAssessParameterSet
 
Method Summary
 Collection<Result> getAnnotation()
           
 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.
 int getRepeats()
           
 int[] getTrain_TestNumbers(boolean train_case)
           
protected  void initializeMyParametersArrayList()
          Initializes the list of Parameters in this ParameterSet.
protected  void loadParameters()
          Loads the parameters for this ParameterSet.
 
Methods inherited from class de.jstacs.classifier.assessment.ClassifierAssessmentAssessParameterSet
getAllClassifierAssessmentAssessParameterSets, getElementLength, getExceptionIfMPNotComputable
 
Methods inherited from class de.jstacs.parameters.ParameterSet
clone, fromXML, getErrorMessage, getId, getInstance, getInstanceClass, getNumberOfParameters, getNumberOfValues, getParameterAt, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isRanged, makeRanged, next, parametersLoaded, propagateId, recieveId, replaceParametersWithRangedInstance, reset, resetToFirst, setAlternativeInstanceClass, setParent, simplify, toXML, valuesToString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepeatedSubSamplingAssessParameterSet

protected RepeatedSubSamplingAssessParameterSet(Class alternativeInstanceClass)
inherited from ClassifierAssessmentAssessParameterSet


RepeatedSubSamplingAssessParameterSet

public RepeatedSubSamplingAssessParameterSet()
                                      throws UnsupportedOperationException
inherited from ClassifierAssessmentAssessParameterSet

Throws:
UnsupportedOperationException

RepeatedSubSamplingAssessParameterSet

protected RepeatedSubSamplingAssessParameterSet(StringBuffer representation)
                                         throws NonParsableException
inherited from ClassifierAssessmentAssessParameterSet

Throws:
NonParsableException

RepeatedSubSamplingAssessParameterSet

public RepeatedSubSamplingAssessParameterSet(int elementLength,
                                             boolean exceptionIfMPNotComputable,
                                             int repeats,
                                             int[] trainNumbers,
                                             int[] testNumbers)
                                      throws SimpleParameter.IllegalValueException
Parameters:
elementLength - defines the length of elements (sequences) the classifiers to be assessed are able to classify
exceptionIfMPNotComputable - a RepeatedSubSamplingAssessParameterSet is used in combination with an MeasureParameters-object to call assess-methods of RepeatedSubSamplingExperiments. If exceptionIfMPNotComputable=true then an expection is thrown in case of a selected measure-parameters that could not be computed.
repeats - the number of repeates of each iteration (subsample test- and train-data-sets from user-supplied data, train classifiers using train-data-sets and test them using test-data-sets) of that RepeatedHoldOutExperiment this RepatedHoldOutAssessParameterSet is used with
trainNumbers - an array containing for each class (the classifiers to be assessed are capable to distinguish) the number of elements the subsampled train-data-sets should contain
testNumbers - an array containing for each class (the classifiers to be assessed are capable to distinguish) the number of elements the subsampled test-data-sets should contain
Throws:
SimpleParameter.IllegalValueException - is thrown in case of out-of-range or invalid given parameters
Method Detail

initializeMyParametersArrayList

protected void initializeMyParametersArrayList()
Description copied from class: ClassifierAssessmentAssessParameterSet
Initializes the list of Parameters in this ParameterSet.

Overrides:
initializeMyParametersArrayList in class ClassifierAssessmentAssessParameterSet

loadParameters

protected void loadParameters()
                       throws Exception
Description copied from class: ParameterSet
Loads the parameters for this ParameterSet. This is in most cases done by simply creating a new ArrayList<Parameter> for the field parameters/code> and filling it with instances of subclasses of Parameter

Overrides:
loadParameters in class ClassifierAssessmentAssessParameterSet
Throws:
Exception - an Exception is thrown if the parameters could not be loaded
See Also:
ParameterSet.parameters, Parameter

getInstanceName

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

Overrides:
getInstanceName in class ClassifierAssessmentAssessParameterSet
Returns:
the name

getInstanceComment

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

Overrides:
getInstanceComment in class ClassifierAssessmentAssessParameterSet
Returns:
the comment

getRepeats

public int getRepeats()
Returns:
the repeates defined by this RepatedSubSamplingAssessParameterSet (repeats defines how many iterations (train and test classifiers) of that RepeatedSubSamplingExperiment this RepeatedSubSamplingAssessParameterSet is used with are performed)

getTrain_TestNumbers

public int[] getTrain_TestNumbers(boolean train_case)
Parameters:
train_case - if true then (train | test)=train else =test
Returns:
an array class-wise containing the number of elements the subsampled (train | test)-data-sets should consist of.

getAnnotation

public Collection<Result> getAnnotation()
Overrides:
getAnnotation in class ClassifierAssessmentAssessParameterSet
Returns:
collection of parameters containing informations about this ClassifierAssessmentAssessParameterSet