|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.classifier.assessment.ClassifierAssessment
de.jstacs.classifier.assessment.Sampled_RepeatedHoldOutExperiment
public class Sampled_RepeatedHoldOutExperiment
This class is a special ClassifierAssessment that partitions the data of a reference class and samples non-overlapping for the other classes, so that one get the same number of sequences and the same lengths of the sequences.
Field Summary |
---|
Fields inherited from class de.jstacs.classifier.assessment.ClassifierAssessment |
---|
myAbstractClassifier, myBuildClassifierByCrossProduct, myModel, myTempMeanResultSets, skipLastClassifiersDuringClassifierTraining |
Constructor Summary | |
---|---|
|
Sampled_RepeatedHoldOutExperiment(AbstractClassifier... aCs)
Creates a new Sampled_RepeatedHoldOutExperiment from a set of AbstractClassifier s. |
|
Sampled_RepeatedHoldOutExperiment(AbstractClassifier[] aCs,
boolean buildClassifiersByCrossProduct,
Model[]... aMs)
This constructor allows to assess a collection of given AbstractClassifier s and those constructed
using the given AbstractModel s by a Sampled_RepeatedHoldOutExperiment . |
protected |
Sampled_RepeatedHoldOutExperiment(AbstractClassifier[] aCs,
Model[][] aMs,
boolean buildClassifiersByCrossProduct,
boolean checkAlphabetConsistencyAndLength)
Creates a new Sampled_RepeatedHoldOutExperiment from an array of AbstractClassifier s and a two-dimensional array
of Model s, which are combined to additional classifiers. |
|
Sampled_RepeatedHoldOutExperiment(boolean buildClassifiersByCrossProduct,
Model[]... aMs)
Creates a new Sampled_RepeatedHoldOutExperiment from a set of Model s. |
Method Summary | |
---|---|
protected boolean |
evaluateClassifier(MeasureParameters mp,
ClassifierAssessmentAssessParameterSet assessPS,
Sample[] s,
ProgressUpdater pU)
This method must be implemented in all subclasses. |
Methods inherited from class de.jstacs.classifier.assessment.ClassifierAssessment |
---|
assess, assess, assess, getClassifier, getNameOfAssessment, prepareAssessment, test, train |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Sampled_RepeatedHoldOutExperiment(AbstractClassifier[] aCs, Model[][] aMs, boolean buildClassifiersByCrossProduct, boolean checkAlphabetConsistencyAndLength) throws IllegalArgumentException, WrongAlphabetException, CloneNotSupportedException, ClassDimensionException
Sampled_RepeatedHoldOutExperiment
from an array of AbstractClassifier
s and a two-dimensional array
of Model
s, which are combined to additional classifiers. If buildClassifiersByCrossProduct
is true
,
the cross product of all Model
s in aMs
is built to obtain these classifiers.
aCs
- the pre-defined classifiersaMs
- the Model
s that are used to build additional classifiersbuildClassifiersByCrossProduct
- Determines how classifiers are constructed using the given models. Suppose a k-class problem. In this
case, each classifier is supposed to consist of k models, one responsible for each class. checkAlphabetConsistencyAndLength
- indicates if alphabets and lengths shall be checked for consistency
IllegalArgumentException
WrongAlphabetException
CloneNotSupportedException
ClassDimensionException
public Sampled_RepeatedHoldOutExperiment(AbstractClassifier... aCs) throws IllegalArgumentException, WrongAlphabetException, CloneNotSupportedException, ClassDimensionException
Sampled_RepeatedHoldOutExperiment
from a set of AbstractClassifier
s.
aCs
- contains the classifiers to be assessedIllegalArgumentException
WrongAlphabetException
- if not all given classifiers are defined on the same AlphabetContainer
ClassDimensionException
CloneNotSupportedException
public Sampled_RepeatedHoldOutExperiment(boolean buildClassifiersByCrossProduct, Model[]... aMs) throws IllegalArgumentException, WrongAlphabetException, CloneNotSupportedException, ClassDimensionException
Sampled_RepeatedHoldOutExperiment
from a set of Model
s. The argument buildClassifiersByCrossProduct
determines how these Model
s are combined to classifiers.
buildClassifiersByCrossProduct
- aMs
- WrongAlphabetException
- if not all given models are defines on the same AlphabetContainer
IllegalArgumentException
CloneNotSupportedException
ClassDimensionException
public Sampled_RepeatedHoldOutExperiment(AbstractClassifier[] aCs, boolean buildClassifiersByCrossProduct, Model[]... aMs) throws IllegalArgumentException, WrongAlphabetException, CloneNotSupportedException, ClassDimensionException
AbstractClassifier
s and those constructed
using the given AbstractModel
s by a Sampled_RepeatedHoldOutExperiment
.
aCs
- contains some AbstractClassifier
that should be assessed in addition to the
AbstractClassifiers
constructed using the given AbstractModels
buildClassifiersByCrossProduct
- aMs
- WrongAlphabetException
- if not all given models are defines on the same AlphabetContainer
IllegalArgumentException
CloneNotSupportedException
ClassDimensionException
Method Detail |
---|
protected boolean evaluateClassifier(MeasureParameters mp, ClassifierAssessmentAssessParameterSet assessPS, Sample[] s, ProgressUpdater pU) throws IllegalArgumentException, Exception
ClassifierAssessment
evaluateClassifier
in class ClassifierAssessment
mp
- defines which performance-measures are used to assess classifiersassessPS
- containes assessment-specific parameters (like: number of iterations of a k-fold-crossvalidation)s
- data to be used for assessment (both: test- and train-data)pU
- a ProgressUpdater
that mainly has to be used to allow the user to cancel a current
running alssifier assessment. This ProgressUpdater
is guaranteed to be not
null
. In certain cases aborting a classifier assessment will not be allowed for
example in case of KFoldCrossValidation
. In this case the given
ProgressUpdater
should be ignored. pU.setMax()
= number of iterations of the assessment-loop
assessment-loop
pU.setValue()
=iteration+1;
Sample
treatment
train()
;
test()
;
repeat unless(ready or not(pU.isCanceled()))
IllegalArgumentException
- if the given AssessParameterSet
is of wrong type
Exception
- that occured during training or using classifiers/models
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |