de.jstacs.classifiers.differentiableSequenceScoreBased.msp
Class MSPClassifier
java.lang.Object
de.jstacs.classifiers.AbstractClassifier
de.jstacs.classifiers.AbstractScoreBasedClassifier
de.jstacs.classifiers.differentiableSequenceScoreBased.ScoreClassifier
de.jstacs.classifiers.differentiableSequenceScoreBased.gendismix.GenDisMixClassifier
de.jstacs.classifiers.differentiableSequenceScoreBased.msp.MSPClassifier
- All Implemented Interfaces:
- Storable, Cloneable
public class MSPClassifier
- extends GenDisMixClassifier
This class implements a classifier that allows the training via MCL or MSP principle.
- Author:
- Jens Keilwagen, Jan Grau
| Methods inherited from class de.jstacs.classifiers.differentiableSequenceScoreBased.ScoreClassifier |
createStructure, createStructure, doOptimization, getClassifierAnnotation, getCurrentParameterSet, getDifferentiableSequenceScore, getDifferentiableSequenceScores, getLastScore, getNumericalCharacteristics, getScore, hasBeenOptimized, initUsingParameters, isInitialized, preoptimize, setOutputStream, train |
| Methods inherited from class de.jstacs.classifiers.AbstractScoreBasedClassifier |
check, check, classify, classify, createDefaultClassWeights, getClassWeight, getClassWeights, getMultiClassScores, getNumberOfClasses, getPValue, getPValue, getResults, getScore, getScores, setClassWeights, setClassWeights, setThresholdClassWeights |
MSPClassifier
public MSPClassifier(GenDisMixClassifierParameterSet params,
DifferentiableSequenceScore... score)
throws CloneNotSupportedException
- This convenience constructor creates an
MSPClassifier that used MCL principle for training.
- Parameters:
params - the parameter set for the classifierscore - the DifferentiableSequenceScores for the classes
- Throws:
CloneNotSupportedException - if at least one DifferentiableSequenceScore could not be cloned- See Also:
DoesNothingLogPrior,
MSPClassifier(GenDisMixClassifierParameterSet, LogPrior, DifferentiableSequenceScore...)
MSPClassifier
public MSPClassifier(GenDisMixClassifierParameterSet params,
LogPrior prior,
DifferentiableSequenceScore... score)
throws CloneNotSupportedException
- The default constructor that creates a new
MSPClassifier from a
given parameter set, a prior and DifferentiableSequenceScores for the
classes.
- Parameters:
params - the parameter set for the classifierprior - the prior that shall be used; the learning principle depends on the prior: if the prior is null or DoesNothingLogPrior then MCL is used otherwise MSPscore - the DifferentiableSequenceScores for the classes
- Throws:
CloneNotSupportedException - if at least one DifferentiableSequenceScore could not be cloned- See Also:
MSPClassifier(GenDisMixClassifierParameterSet, LogPrior, double, DifferentiableSequenceScore...),
ScoreClassifier.NOT_TRAINED_VALUE,
GenDisMixClassifier.setPrior(LogPrior)
MSPClassifier
public MSPClassifier(GenDisMixClassifierParameterSet params,
LogPrior prior,
double lastScore,
DifferentiableSequenceScore... score)
throws CloneNotSupportedException
- This constructor that creates a new
MSPClassifier from a
given parameter set, a prior and DifferentiableSequenceScores for the
classes. Additionally, the value lastScore can be set to determine the return value of
ScoreClassifier.getLastScore(). This might be useful if the parameters of the classifier are
determined by an external procedure.
- Parameters:
params - the parameter set for the classifierprior - the prior that shall be used; the learning principle depends on the prior: if the prior is null or DoesNothingLogPrior then MCL is used otherwise MSPlastScore - the score of the last optimizationscore - the DifferentiableSequenceScores for the classes
- Throws:
CloneNotSupportedException - if at least one DifferentiableSequenceScore could not be cloned- See Also:
GenDisMixClassifier.GenDisMixClassifier(GenDisMixClassifierParameterSet, LogPrior, LearningPrinciple, de.jstacs.sequenceScores.statisticalModels.differentiable.DifferentiableStatisticalModel...),
LearningPrinciple.MSP,
GenDisMixClassifier.setPrior(LogPrior)
MSPClassifier
public MSPClassifier(StringBuffer xml)
throws NonParsableException
- This is the constructor for
Storable.
- Parameters:
xml - the xml representation
- Throws:
NonParsableException - if the representation could not be parsed.
getXMLTag
protected String getXMLTag()
- Description copied from class:
AbstractClassifier
- Returns the
String that is used as tag for the XML representation
of the classifier. This method is used by the methods
AbstractClassifier.fromXML(StringBuffer) and AbstractClassifier.toXML().
- Overrides:
getXMLTag in class GenDisMixClassifier
- Returns:
- the
String that is used as tag for the XML representation
of the classifier
getInstanceName
public String getInstanceName()
- Description copied from class:
AbstractClassifier
- Returns a short description of the classifier.
- Overrides:
getInstanceName in class GenDisMixClassifier
- Returns:
- a short description of the classifier