|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.classifier.AbstractClassifier
de.jstacs.classifier.AbstractScoreBasedClassifier
de.jstacs.classifier.modelBased.ModelBasedClassifier
de.jstacs.models.discrete.inhomogeneous.shared.SharedStructureClassifier
public class SharedStructureClassifier
This class enables you to learn the structure on all classes together. A special case is for instance a TAN.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.jstacs.classifier.AbstractScoreBasedClassifier |
|---|
AbstractScoreBasedClassifier.DoubleTableResult |
| Field Summary |
|---|
| Fields inherited from class de.jstacs.classifier.modelBased.ModelBasedClassifier |
|---|
models |
| Constructor Summary | |
|---|---|
SharedStructureClassifier(int length,
StructureLearner.ModelType model,
byte order,
StructureLearner.LearningType method,
FSDAGModel... models)
The main constructor. |
|
SharedStructureClassifier(StringBuffer xml)
The constructor for the Storable interface. |
|
| 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. |
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(Sample[] data,
double[][] weights)
This method trains a classifier over an array of weighted Samples. |
| Methods inherited from class de.jstacs.classifier.modelBased.ModelBasedClassifier |
|---|
classify, getCharacteristics, getModel, getNumericalCharacteristics, getPossibleLength, getScore, getScores, getXMLTag, isTrained, setNewAlphabetContainerInstance |
| Methods inherited from class de.jstacs.classifier.AbstractScoreBasedClassifier |
|---|
check, check, classify, classify, createDefaultClassWeights, getClassWeight, getClassWeights, getNumberOfClasses, getPValue, getPValue, getResults, getScore, setClassWeights, setThresholdClassWeights, test |
| Methods inherited from class de.jstacs.classifier.AbstractClassifier |
|---|
evaluate, evaluateAll, getAlphabetContainer, getClassificationRate, getLength, getMeasuresForEvaluate, getMeasuresForEvaluateAll, 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,
FSDAGModel... models)
throws IllegalArgumentException,
CloneNotSupportedException,
ClassDimensionException
length - the sequence lengthmodel - the model typeorder - the model ordermethod - 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)
public SharedStructureClassifier(StringBuffer xml)
throws NonParsableException
Storable interface.
xml - the StringBuffer
NonParsableException - if the StringBuffer is not parsable| Method Detail |
|---|
public SharedStructureClassifier clone()
throws CloneNotSupportedException
clone in class ModelBasedClassifierCloneNotSupportedException
public void train(Sample[] data,
double[][] weights)
throws IllegalArgumentException,
Exception
AbstractClassifierSamples. That is why the following has to be fulfilled:
s.length == weights.length
weights[i] == null || s[i].getNumberOfElements() == weights[i].length.
train( Sample[] ).
Samples are defined over
the underlying alphabet and length.
train in class ModelBasedClassifierdata - an array of Samplesweights - the weights for s
Exception - an Exception should be thrown if the weights are
incorrect or the training did not succeed
IllegalArgumentExceptionpublic String getInstanceName()
AbstractClassifier
getInstanceName in class ModelBasedClassifier
protected void extractFurtherClassifierInfosFromXML(StringBuffer xml)
throws NonParsableException
AbstractClassifierAbstractClassifier.fromXML(StringBuffer) and
should not be made public.
extractFurtherClassifierInfosFromXML in class ModelBasedClassifierxml - XML representation
NonParsableException - if the information could not be parsed out of the
StringBufferprotected StringBuffer getFurtherClassifierInfos()
AbstractClassifierStringBuffer. This method is used by the method AbstractClassifier.toXML()
and should not be made public.
getFurtherClassifierInfos in class ModelBasedClassifierStringBufferpublic 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 ModelBasedClassifierResults that contains information the
classifier
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||