public class ClassifierFactory extends Object
TrainableStatisticalModels, DifferentiableStatisticalModels, and DifferentiableSequenceScores.
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 and Description |
|---|
ClassifierFactory() |
| Modifier and Type | Method and Description |
|---|---|
static AbstractClassifier |
createClassifier(DifferentiableSequenceScore... models)
Creates a classifier that is based on at least two
DifferentiableSequenceScores. |
static AbstractClassifier |
createClassifier(double[] beta,
DifferentiableStatisticalModel... models)
Creates a classifier that is based on at least two
DifferentiableStatisticalModels. |
static AbstractClassifier |
createClassifier(LearningPrinciple principle,
DifferentiableStatisticalModel... models)
Creates a classifier that is based on at least two
DifferentiableStatisticalModels. |
static AbstractClassifier |
createGenerativeClassifier(TrainableStatisticalModel... models)
Creates a classifier that is based on at least two
TrainableStatisticalModels. |
public static AbstractClassifier createGenerativeClassifier(TrainableStatisticalModel... models) throws IllegalArgumentException, CloneNotSupportedException, ClassDimensionException
TrainableStatisticalModels. 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 classesIllegalArgumentException - if the TrainableStatisticalModels do not describe a common domain of
sequencesCloneNotSupportedException - if at least one TrainableStatisticalModel could not be clonedClassDimensionException - if the number of classes is below 2public static AbstractClassifier createClassifier(LearningPrinciple principle, DifferentiableStatisticalModel... models) throws IllegalArgumentException, Exception
DifferentiableStatisticalModels. 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 classesIllegalArgumentException - if the lengths of the DifferentiableStatisticalModels (see SequenceScore.getLength()) are incompatibleException - if something else went wrongpublic static AbstractClassifier createClassifier(double[] beta, DifferentiableStatisticalModel... models) throws IllegalArgumentException, Exception
DifferentiableStatisticalModels. 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 classesIllegalArgumentException - if the lengths of the DifferentiableStatisticalModels (see SequenceScore.getLength()) are incompatibleException - if something else went wrongLearningPrinciple,
LogGenDisMixFunctionpublic static AbstractClassifier createClassifier(DifferentiableSequenceScore... models) throws IllegalArgumentException, Exception
DifferentiableSequenceScores. Such scores can be created using the
DifferentiableStatisticalModelFactory (since DifferentiableStatisticalModels are also DifferentiableSequenceScores)
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 classesIllegalArgumentException - if the lengths of the DifferentiableSequenceScores (see SequenceScore.getLength()) are incompatibleException - if something else went wrong