|
||||||||||
| 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 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 Summary | |
|---|---|
ClassifierFactory()
|
|
| Method Summary | |
|---|---|
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. |
| 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
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 classes
IllegalArgumentException - if the TrainableStatisticalModels 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
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 classes
IllegalArgumentException - if the lengths of the DifferentiableStatisticalModels (see SequenceScore.getLength()) are incompatible
Exception - 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 classes
IllegalArgumentException - if the lengths of the DifferentiableStatisticalModels (see SequenceScore.getLength()) are incompatible
Exception - 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 classes
IllegalArgumentException - if the lengths of the DifferentiableSequenceScores (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 | |||||||||