public class SharedStructureClassifier extends TrainSMBasedClassifier
AbstractScoreBasedClassifier.DoubleTableResultmodels| Constructor and Description |
|---|
SharedStructureClassifier(int length,
StructureLearner.ModelType model,
byte order,
StructureLearner.LearningType method,
FSDAGTrainSM... models)
Creates a new
SharedStructureClassifier from given
FSDAGTrainSMs. |
SharedStructureClassifier(StringBuffer xml)
The standard constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
SharedStructureClassifier |
clone() |
protected void |
extractFurtherClassifierInfosFromXML(StringBuffer xml)
Extracts further information of a classifier from an XML representation.
|
CategoricalResult[] |
getClassifierAnnotation()
Returns an array of
Results of dimension
AbstractClassifier.getNumberOfClasses() that contains information about the
classifier and for each class.
res[0] = new CategoricalResult( "classifier", "the kind of classifier", getInstanceName() ); |
protected StringBuffer |
getFurtherClassifierInfos()
This method returns further information of a classifier as a
StringBuffer. |
String |
getInstanceName()
Returns a short description of the classifier.
|
void |
train(DataSet[] data,
double[][] weights)
This method trains a classifier over an array of weighted
DataSet
s. |
classify, getCharacteristics, getModel, getNumericalCharacteristics, getPossibleLength, getScore, getScores, getXMLTag, isInitialized, toStringcheck, check, classify, classify, createDefaultClassWeights, getClassWeight, getClassWeights, getMultiClassScores, getNumberOfClasses, getPValue, getPValue, getResults, getScore, setClassWeights, setClassWeights, setThresholdClassWeightsevaluate, evaluate, getAlphabetContainer, getLength, toXML, trainpublic SharedStructureClassifier(int length,
StructureLearner.ModelType model,
byte order,
StructureLearner.LearningType method,
FSDAGTrainSM... models)
throws IllegalArgumentException,
CloneNotSupportedException,
ClassDimensionException
SharedStructureClassifier from given
FSDAGTrainSMs. This is the main constructor.length - the sequence lengthmodel - the type of the modelorder - the order of the modelmethod - the learning methodmodels - the class modelsIllegalArgumentException - if order is below 0CloneNotSupportedException - if at least one model could not be clonedClassDimensionException - if the class dimension is wrong (below 2)StructureLearner.ModelType,
StructureLearner.LearningType,
TrainSMBasedClassifier.TrainSMBasedClassifier(boolean, de.jstacs.sequenceScores.statisticalModels.trainable.TrainableStatisticalModel...)public SharedStructureClassifier(StringBuffer xml) throws NonParsableException
Storable.
Creates a new SharedStructureClassifier out of its XML
representation.xml - the XML representation as StringBufferNonParsableException - if the SharedStructureClassifier could not be
reconstructed out of the XML representation (the
StringBuffer could not be parsed)Storable,
TrainSMBasedClassifier.TrainSMBasedClassifier(StringBuffer)public SharedStructureClassifier clone() throws CloneNotSupportedException
clone in class TrainSMBasedClassifierCloneNotSupportedExceptionpublic void train(DataSet[] data, double[][] weights) throws IllegalArgumentException, Exception
AbstractClassifierDataSet
s. That is why the following has to be fulfilled:
s.length == weights.length
weights[i] == null || s[i].getNumberOfElements() == weights[i].length.
AbstractClassifier.train(DataSet...).
DataSets are defined over the
underlying alphabet and length.train in class TrainSMBasedClassifierdata - an array of DataSetsweights - the weights for the DataSetsException - if the weights are incorrect or the training did not succeedIllegalArgumentExceptionAbstractClassifier.train(DataSet...)public String getInstanceName()
AbstractClassifiergetInstanceName in class TrainSMBasedClassifierprotected void extractFurtherClassifierInfosFromXML(StringBuffer xml) throws NonParsableException
AbstractClassifierAbstractClassifier.fromXML(StringBuffer) and
should not be made public.extractFurtherClassifierInfosFromXML in class TrainSMBasedClassifierxml - the XML representation as StringBufferNonParsableException - if the information could not be parsed out of the XML
representation (the StringBuffer could not be parsed)AbstractClassifier.fromXML(StringBuffer)protected StringBuffer getFurtherClassifierInfos()
AbstractClassifierStringBuffer. This method is used by the method AbstractClassifier.toXML()
and should not be made public.getFurtherClassifierInfos in class TrainSMBasedClassifierStringBufferAbstractClassifier.toXML()public CategoricalResult[] getClassifierAnnotation()
AbstractClassifierResults of dimension
AbstractClassifier.getNumberOfClasses() that contains information about the
classifier and for each class.
res[0] = new CategoricalResult( "classifier", "the kind of classifier", getInstanceName() );
res[1] = new CategoricalResult( "class info 0", "some information about the class", "info0" );
res[2] = new CategoricalResult( "class info 1", "some information about the class", "info1" );
...
getClassifierAnnotation in class TrainSMBasedClassifierResults that contains information about the
classifier