Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.models.discrete.inhomogeneous.shared
Class SharedStructureClassifier

    java.lang.Object
      de.jstacs.classifier.AbstractClassifier
          de.jstacs.classifier.AbstractScoreBasedClassifier
              de.jstacs.classifier.modelBased.ModelBasedClassifier
                  de.jstacs.models.discrete.inhomogeneous.shared.SharedStructureClassifier

All Implemented Interfaces:
  Storable, Cloneable

    public class SharedStructureClassifier

extends ModelBasedClassifier

This class enables you to learn the structure on all classes together. A special case is for instance a TAN.

Author:
  Jens Keilwagen

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 `getNumberOfClasses` that contains information 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 `Sample`s.

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

### SharedStructureClassifier

    public SharedStructureClassifier(int length,
                                     StructureLearner.ModelType model,
                                     byte order,
                                     StructureLearner.LearningType method,
                                     FSDAGModel... models)
                              throws IllegalArgumentException,
                                     CloneNotSupportedException,
                                     ClassDimensionException

  The main constructor.

  Parameters:
    `length` - the sequence length
    `model` - the model type
    `order` - the model order
    `method` - the learning method
    `models` - the class models
  Throws:
    `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)

### SharedStructureClassifier

    public SharedStructureClassifier(StringBuffer xml)
                              throws NonParsableException

  The constructor for the `Storable` interface.

  Parameters:
    `xml` - the StringBuffer
  Throws:
    `NonParsableException` - if the StringBuffer is not parsable

Method Detail

### clone

    public SharedStructureClassifier clone()
                                    throws CloneNotSupportedException

  Overrides:
    `clone` in class `ModelBasedClassifier`
  Throws:
    `CloneNotSupportedException`

### train

    public void train(Sample[] data,
                      double[][] weights)
               throws IllegalArgumentException,
                      Exception

  Description copied from class: `AbstractClassifier`
  This method trains a classifier over an array of weighted `Sample`s. That's why the following has to be fulfilled:
  - `s.length == weights.length`
  - and for all i: `weights[i] == null || s[i].getNumberOfElements() == weights[i].length`.
  This method should work non-incrementally as the method `train( Sample[] )`.
  This method should check that the `Sample`s are defined over the underlying alphabet and length.

  Overrides:
    `train` in class `ModelBasedClassifier`
  Parameters:
    `data` - an array of `Sample`s
    `weights` - the weights for `s`
  Throws:
    `Exception` - an Exception should be thrown if the weights are incorrect or the training did not succeed
    `IllegalArgumentException`

### getInstanceName

    public String getInstanceName()

  Description copied from class: `AbstractClassifier`
  Returns a short description of the classifier.

  Overrides:
    `getInstanceName` in class `ModelBasedClassifier`
  Returns:
    a short description of the classifier

### extractFurtherClassifierInfosFromXML

    protected void extractFurtherClassifierInfosFromXML(StringBuffer xml)
                                                 throws NonParsableException

  Description copied from class: `AbstractClassifier`
  Extracts further information of a classifier from an xml-representation. This method is used by the method `fromXML( StringBuffer )` and should not be made public.

  Overrides:
    `extractFurtherClassifierInfosFromXML` in class `ModelBasedClassifier`
  Parameters:
    `xml` - the xml-representation
  Throws:
    `NonParsableException`

### getFurtherClassifierInfos

    protected StringBuffer getFurtherClassifierInfos()

  Description copied from class: `AbstractClassifier`
  This method returns further information of a classifier as a StringBuffer. This method is used by the method `toXML()` and should not be made public.

  Overrides:
    `getFurtherClassifierInfos` in class `ModelBasedClassifier`
  Returns:
    further information of a classifier as a StringBuffer

### getClassifierAnnotation

    public CategoricalResult[] getClassifierAnnotation()

  Description copied from class: `AbstractClassifier`
  Returns an array of Results of dimension `getNumberOfClasses` that contains information 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" ); ...`

  Overrides:
    `getClassifierAnnotation` in class `ModelBasedClassifier`
  Returns:
    an array of Results that contains information the classifier

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD