|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.classifiers.ClassifierFactory
public class ClassifierFactory
This class allows to easily create classifiers from TrainableStatisticalModel
s, DifferentiableStatisticalModel
s, and DifferentiableSequenceScore
s.
Most parameters of the classifiers are set to default values. If you like to set some of these additional parameters to non-standard values, directly use the constructors of
TrainSMBasedClassifier
, GenDisMixClassifier
, or MSPClassifier
.
Constructor Summary | |
---|---|
ClassifierFactory()
|
Method Summary | |
---|---|
static AbstractClassifier |
createClassifier(DifferentiableSequenceScore... models)
Creates a classifier that is based on at least two DifferentiableSequenceScore s. |
static AbstractClassifier |
createClassifier(double[] beta,
DifferentiableStatisticalModel... models)
Creates a classifier that is based on at least two DifferentiableStatisticalModel s. |
static AbstractClassifier |
createClassifier(LearningPrinciple principle,
DifferentiableStatisticalModel... models)
Creates a classifier that is based on at least two DifferentiableStatisticalModel s. |
static AbstractClassifier |
createGenerativeClassifier(TrainableStatisticalModel... models)
Creates a classifier that is based on at least two TrainableStatisticalModel s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassifierFactory()
Method Detail |
---|
public static AbstractClassifier createGenerativeClassifier(TrainableStatisticalModel... models) throws IllegalArgumentException, CloneNotSupportedException, ClassDimensionException
TrainableStatisticalModel
s. Such models can be created using the
TrainableStatisticalModelFactory
or by directly using constructors of sub-classes of TrainableStatisticalModel
.
After the classifier has been created, it can be trained using the AbstractClassifier.train(de.jstacs.data.DataSet...)
method using
one data set for each TrainableStatisticalModel
provided.
models
- the models for the individual classes
IllegalArgumentException
- if the TrainableStatisticalModel
s do not describe a common domain of
sequences
CloneNotSupportedException
- if at least one TrainableStatisticalModel
could not be cloned
ClassDimensionException
- if the number of classes is below 2public static AbstractClassifier createClassifier(LearningPrinciple principle, DifferentiableStatisticalModel... models) throws IllegalArgumentException, Exception
DifferentiableStatisticalModel
s. Such models can be created using the
DifferentiableStatisticalModelFactory
or by directly using constructors of sub-classes of DifferentiableStatisticalModel
.
After the classifier has been created, it can be trained using the AbstractClassifier.train(de.jstacs.data.DataSet...)
method using
one data set for each DifferentiableStatisticalModel
provided. The LearningPrinciple
(generative ML or MAP,
or discriminative MCL or MSP) must be provided as first parameter.
principle
- the learning principlemodels
- the models for the individual classes
IllegalArgumentException
- if the lengths of the DifferentiableStatisticalModel
s (see SequenceScore.getLength()
) are incompatible
Exception
- if something else went wrongpublic static AbstractClassifier createClassifier(double[] beta, DifferentiableStatisticalModel... models) throws IllegalArgumentException, Exception
DifferentiableStatisticalModel
s. Such models can be created using the
DifferentiableStatisticalModelFactory
or by directly using constructors of sub-classes of DifferentiableStatisticalModel
.
After the classifier has been created, it can be trained using the AbstractClassifier.train(de.jstacs.data.DataSet...)
method using
one data set for each DifferentiableStatisticalModel
provided. The beta
array determines the employed learning principle
and must be provided as first parameter.
beta
- an array specifying the learning principle by weighting factors for conditional likelihood, likelihood and priormodels
- the models for the individual classes
IllegalArgumentException
- if the lengths of the DifferentiableStatisticalModel
s (see SequenceScore.getLength()
) are incompatible
Exception
- if something else went wrongLearningPrinciple
,
LogGenDisMixFunction
public static AbstractClassifier createClassifier(DifferentiableSequenceScore... models) throws IllegalArgumentException, Exception
DifferentiableSequenceScore
s. Such scores can be created using the
DifferentiableStatisticalModelFactory
(since DifferentiableStatisticalModel
s are also DifferentiableSequenceScore
s)
or by directly using constructors of sub-classes of DifferentiableSequenceScore
.
After the classifier has been created, it can be trained using the discriminative MCL principle using the AbstractClassifier.train(de.jstacs.data.DataSet...)
method using
one data set for each DifferentiableSequenceScore
provided.
models
- the models for the individual classes
IllegalArgumentException
- if the lengths of the DifferentiableSequenceScore
s (see SequenceScore.getLength()
) are incompatible
Exception
- if something else went wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |