|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.classifiers.AbstractClassifier
de.jstacs.classifiers.AbstractScoreBasedClassifier
de.jstacs.classifiers.trainSMBased.TrainSMBasedClassifier
de.jstacs.sequenceScores.statisticalModels.trainable.discrete.inhomogeneous.shared.SharedStructureClassifier
public class SharedStructureClassifier
This class enables you to learn the structure on all classes of the classifier together. A special case is, for instance, a Tree Augmented Naive Bayes (TAN).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.jstacs.classifiers.AbstractScoreBasedClassifier |
|---|
AbstractScoreBasedClassifier.DoubleTableResult |
| Field Summary |
|---|
| Fields inherited from class de.jstacs.classifiers.trainSMBased.TrainSMBasedClassifier |
|---|
models |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class de.jstacs.classifiers.trainSMBased.TrainSMBasedClassifier |
|---|
classify, getCharacteristics, getModel, getNumericalCharacteristics, getPossibleLength, getScore, getScores, getXMLTag, isInitialized |
| Methods inherited from class de.jstacs.classifiers.AbstractScoreBasedClassifier |
|---|
check, check, classify, classify, createDefaultClassWeights, getClassWeight, getClassWeights, getMultiClassScores, getNumberOfClasses, getPValue, getPValue, getResults, getScore, setClassWeights, setClassWeights, setThresholdClassWeights |
| Methods inherited from class de.jstacs.classifiers.AbstractClassifier |
|---|
evaluate, evaluate, getAlphabetContainer, getLength, toXML, train |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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 models
IllegalArgumentException - if order is below 0
CloneNotSupportedException - if at least one model could not be cloned
ClassDimensionException - 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 StringBuffer
NonParsableException - if the SharedStructureClassifier could not be
reconstructed out of the XML representation (the
StringBuffer could not be parsed)Storable,
TrainSMBasedClassifier.TrainSMBasedClassifier(StringBuffer)| Method Detail |
|---|
public SharedStructureClassifier clone()
throws CloneNotSupportedException
clone in class TrainSMBasedClassifierCloneNotSupportedException
public 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 DataSets
Exception - if the weights are incorrect or the training did not succeed
IllegalArgumentExceptionAbstractClassifier.train(DataSet...)public String getInstanceName()
AbstractClassifier
getInstanceName in class TrainSMBasedClassifier
protected void extractFurtherClassifierInfosFromXML(StringBuffer xml)
throws NonParsableException
AbstractClassifierAbstractClassifier.fromXML(StringBuffer) and
should not be made public.
extractFurtherClassifierInfosFromXML in class TrainSMBasedClassifierxml - the XML representation as StringBuffer
NonParsableException - 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||