de.jstacs.classifiers.assessment
Class RepeatedSubSamplingAssessParameterSet

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

public class RepeatedSubSamplingAssessParameterSet
extends ClassifierAssessmentAssessParameterSet

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

Author:
Andre Gohr (bioinf (nospam:.) ag (nospam:@) googlemail (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
errorMessage, parameters, parent
 
Constructor Summary
RepeatedSubSamplingAssessParameterSet()
          Constructs a new RepeatedSubSamplingAssessParameterSet with empty parameter values.
RepeatedSubSamplingAssessParameterSet(int elementLength, boolean exceptionIfMPNotComputable, int repeats, double[] trainNumbers, double[] testNumbers)
          Constructs a new RepeatedSubSamplingAssessParameterSet with given parameter values.
RepeatedSubSamplingAssessParameterSet(StringBuffer representation)
          The standard constructor for the interface Storable.
 
Method Summary
 Collection<Result> getAnnotation()
          Returns a Collection of parameters containing informations about this ClassifierAssessmentAssessParameterSet.
 int getRepeats()
          Returns the repeats defined by this RepeatedSubSamplingAssessParameterSet (repeats defines how many iterations (train and test classifiers) of that RepeatedSubSamplingExperiment this RepeatedSubSamplingAssessParameterSet is used with are performed).
 double[] getTrain_TestNumbers(boolean train_case)
          Returns an array containing the number of elements the subsampled (train | test) data sets should consist of.
 
Methods inherited from class de.jstacs.classifiers.assessment.ClassifierAssessmentAssessParameterSet
getElementLength, getExceptionIfMPNotComputable, getStoreAll, setStoreAll
 
Methods inherited from class de.jstacs.parameters.ParameterSet
clone, fromGalaxy, fromXML, getAllParameterNames, getComment, getComment, getErrorMessage, getIndex, getName, getName, getNumberOfParameters, getParameterAt, getParameterForName, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isComparable, parametersLoaded, reset, setParent, toGalaxy, toXML
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepeatedSubSamplingAssessParameterSet

public RepeatedSubSamplingAssessParameterSet()
                                      throws UnsupportedOperationException,
                                             CloneNotSupportedException,
                                             SimpleParameter.IllegalValueException
Constructs a new RepeatedSubSamplingAssessParameterSet with empty parameter values. This constructor should only be used to create "filled" RepeatedSubSamplingAssessParameterSets, i.e. to create RepeatedSubSamplingAssessParameterSets from a set of values and not to fill it from the platform user interface.

Throws:
UnsupportedOperationException - if the RepeatedSubSamplingAssessParameterSet could not be constructed or the parameters could not be loaded
CloneNotSupportedException - if the parameter for the subsampled sequences could not be created
SimpleParameter.IllegalValueException - if the parameters could not be filled with the default values
See Also:
ClassifierAssessmentAssessParameterSet.ClassifierAssessmentAssessParameterSet()

RepeatedSubSamplingAssessParameterSet

public RepeatedSubSamplingAssessParameterSet(StringBuffer representation)
                                      throws NonParsableException
The standard constructor for the interface Storable. Constructs a RepeatedSubSamplingAssessParameterSet out of its XML representation.

Parameters:
representation - the XML representation as StringBuffer
Throws:
NonParsableException - if the RepeatedSubSamplingAssessParameterSet could not be reconstructed out of the XML representation (the StringBuffer representation could not be parsed)
See Also:
ClassifierAssessmentAssessParameterSet.ClassifierAssessmentAssessParameterSet(StringBuffer)

RepeatedSubSamplingAssessParameterSet

public RepeatedSubSamplingAssessParameterSet(int elementLength,
                                             boolean exceptionIfMPNotComputable,
                                             int repeats,
                                             double[] trainNumbers,
                                             double[] testNumbers)
                                      throws SimpleParameter.IllegalValueException,
                                             CloneNotSupportedException
Constructs a new RepeatedSubSamplingAssessParameterSet with given parameter values.

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 AbstractPerformanceMeasure-object to call assess( ... )-methods of RepeatedSubSamplingExperiments. If exceptionIfMPNotComputable==true an Exception is thrown in case of a user selected measure parameters that could not be computed.
repeats - the number of repeats 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 RepeatedSubSamplingAssessParameterSet 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 - in case of out-of-range or invalid given parameters
CloneNotSupportedException - if the parameter for the subsampled sequences could not be created
See Also:
ClassifierAssessmentAssessParameterSet.ClassifierAssessmentAssessParameterSet(int, boolean)
Method Detail

getRepeats

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

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

getTrain_TestNumbers

public double[] getTrain_TestNumbers(boolean train_case)
Returns an array containing the number of elements the subsampled (train | test) data sets should consist of.

Parameters:
train_case - if true then (train | test)=train else (train | test)=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()
Description copied from class: ClassifierAssessmentAssessParameterSet
Returns a Collection of parameters containing informations about this ClassifierAssessmentAssessParameterSet.

Overrides:
getAnnotation in class ClassifierAssessmentAssessParameterSet
Returns:
a Collection of parameters containing informations about this ClassifierAssessmentAssessParameterSet