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.classifier.scoringFunctionBased.cll
Class CLLClassifier

    java.lang.Object
      de.jstacs.classifier.AbstractClassifier
          de.jstacs.classifier.AbstractScoreBasedClassifier
              de.jstacs.classifier.scoringFunctionBased.ScoreClassifier
                  de.jstacs.classifier.scoringFunctionBased.cll.CLLClassifier

All Implemented Interfaces:
  Storable, Cloneable

    public class CLLClassifier

extends ScoreClassifier

This class implements the conditional log likelihood (CLL) classifier.

Author:
  Jens Keilwagen, Jan Grau

Nested Class Summary

Nested classes/interfaces inherited from class de.jstacs.classifier.AbstractScoreBasedClassifier
`AbstractScoreBasedClassifier.DoubleTableResult`

Field Summary
`protected LogPrior` | `prior` The prior that is used in this instance.

Fields inherited from class de.jstacs.classifier.scoringFunctionBased.ScoreClassifier
`hasBeenOptimized, NOT_TRAINED_VALUE, params, score, sostream`

Constructor Summary
`CLLClassifier(CLLClassifierParameterSet params, LogPrior prior, double lastScore, ScoringFunction... score)` This constructor that creates a new `CLLClassifier` from a given parameter set, a prior and `ScoringFunction`s for the classes.
`CLLClassifier(CLLClassifierParameterSet params, LogPrior prior, ScoringFunction... score)` The default constructor that creates a new `CLLClassifier` from a given parameter set, a prior and `ScoringFunction`s for the classes.
`CLLClassifier(CLLClassifierParameterSet params, ScoringFunction... score)` The default constructor that creates a new `CLLClassifier` from a given parameter set and `ScoringFunction`s for the classes.
`CLLClassifier(StringBuffer xml)` The standard constructor for the interface `Storable`.

Method Summary
`CLLClassifier` | `clone()`
`static CLLClassifier[]` | `create(CLLClassifierParameterSet params, LogPrior prior, ScoringFunction[]... functions)` This method creates an array of `CLLClassifier`s by using the cross-product of the given `ScoringFunction`s.
`protected void` | `extractFurtherClassifierInfosFromXML(StringBuffer xml)` Extracts further information of a classifier from an XML representation.
`protected NormConditionalLogLikelihood` | `getFunction(Sample[] data, double[][] weights)` Returns the function that should be optimized.
`protected StringBuffer` | `getFurtherClassifierInfos()` This method returns further information of a classifier as a `StringBuffer`.
`String` | `getInstanceName()` Returns a short description of the classifier.
`protected String` | `getXMLTag()` Returns the `String` that is used as tag for the XML representation of the classifier.
`void` | `setPrior(LogPrior prior)` This method sets a new prior that should be used for optimization.

Methods inherited from class de.jstacs.classifier.scoringFunctionBased.ScoreClassifier
`createStructure, doOptimization, getClassifierAnnotation, getLastScore, getNumericalCharacteristics, getScore, getScoringFunction, getScoringFunctions, hasBeenOptimized, isTrained, setOutputStream, train`

Methods inherited from class de.jstacs.classifier.AbstractScoreBasedClassifier
`check, check, classify, classify, createDefaultClassWeights, getClassWeight, getClassWeights, getNumberOfClasses, getPValue, getPValue, getResults, getScore, getScores, setClassWeights, setThresholdClassWeights, test`

Methods inherited from class de.jstacs.classifier.AbstractClassifier
`classify, evaluate, evaluateAll, getAlphabetContainer, getCharacteristics, getClassificationRate, getLength, getMeasuresForEvaluate, getMeasuresForEvaluateAll, setNewAlphabetContainerInstance, toXML, train`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### prior

    protected LogPrior prior

  The prior that is used in this instance.

Constructor Detail

### CLLClassifier

    public CLLClassifier(CLLClassifierParameterSet params,
                         ScoringFunction... score)
                  throws CloneNotSupportedException

  The default constructor that creates a new `CLLClassifier` from a given parameter set and `ScoringFunction`s for the classes.

  Parameters:
    `params` - the parameter set for the classifier
    `score` - the `ScoringFunction`s for the classes
  Throws:
    `CloneNotSupportedException` - if at least one `ScoringFunction` could not be cloned
  See Also:
    `CLLClassifier(CLLClassifierParameterSet, LogPrior, ScoringFunction...)`

### CLLClassifier

    public CLLClassifier(CLLClassifierParameterSet params,
                         LogPrior prior,
                         ScoringFunction... score)
                  throws CloneNotSupportedException

  The default constructor that creates a new `CLLClassifier` from a given parameter set, a prior and `ScoringFunction`s for the classes.

  Parameters:
    `params` - the parameter set for the classifier
    `prior` - the prior that shall be used
    `score` - the `ScoringFunction`s for the classes
  Throws:
    `CloneNotSupportedException` - if at least one `ScoringFunction` could not be cloned
  See Also:
    `CLLClassifier(CLLClassifierParameterSet, LogPrior, double, ScoringFunction...)`, `ScoreClassifier.NOT_TRAINED_VALUE`, `setPrior(LogPrior)`

### CLLClassifier

    public CLLClassifier(CLLClassifierParameterSet params,
                         LogPrior prior,
                         double lastScore,
                         ScoringFunction... score)
                  throws CloneNotSupportedException

  This constructor that creates a new `CLLClassifier` from a given parameter set, a prior and `ScoringFunction`s 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 classifier
    `prior` - the prior that shall be used
    `lastScore` - the score of the last optimization
    `score` - the `ScoringFunction`s for the classes
  Throws:
    `CloneNotSupportedException` - if at least one `ScoringFunction` could not be cloned
  See Also:
    `ScoreClassifier.ScoreClassifier(de.jstacs.classifier.scoringFunctionBased.ScoreClassifierParameterSet, double, ScoringFunction...)`, `setPrior(LogPrior)`

### CLLClassifier

    public CLLClassifier(StringBuffer xml)
                  throws NonParsableException

  The standard constructor for the interface `Storable`. Constructs a `CLLClassifier` out of its XML representation.

  Parameters:
    `xml` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `CLLClassifier` could not be reconstructed out of the XML representation (the `StringBuffer` could not be parsed)
  See Also:
    `ScoreClassifier.ScoreClassifier(StringBuffer)`, `Storable`

Method Detail

### clone

    public CLLClassifier clone()
                        throws CloneNotSupportedException

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

### getFunction

    protected NormConditionalLogLikelihood getFunction(Sample[] data,
                                                       double[][] weights)
                                                throws Exception

  Description copied from class: `ScoreClassifier`
  Returns the function that should be optimized.

  Specified by:
    `getFunction` in class `ScoreClassifier`
  Parameters:
    `data` - the samples
    `weights` - the weights of the sequences of the samples
  Returns:
    the function that should be optimized
  Throws:
    `Exception` - if something went wrong

### setPrior

    public void setPrior(LogPrior prior)

  This method sets a new prior that should be used for optimization. Since it could not be ensured that the classifier is optimal now `ScoreClassifier.hasBeenOptimized()` will return `false` after invoking this method.

  Parameters:
    `prior` - the new prior
  See Also:
    `ScoreClassifier.hasBeenOptimized()`

### 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()`.

  Specified by:
    `getXMLTag` in class `ScoreClassifier`
  Returns:
    the `String` that is used as tag for the XML representation of the classifier

### 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 `AbstractClassifier.toXML()` and should not be made public.

  Overrides:
    `getFurtherClassifierInfos` in class `ScoreClassifier`
  Returns:
    further information of a classifier as a `StringBuffer`
  See Also:
    `AbstractClassifier.toXML()`

### 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 `AbstractClassifier.fromXML(StringBuffer)` and should not be made public.

  Overrides:
    `extractFurtherClassifierInfosFromXML` in class `ScoreClassifier`
  Parameters:
    `xml` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the information could not be parsed out of the XML representation (the `StringBuffer` could not be parsed)
  See Also:
    `AbstractClassifier.fromXML(StringBuffer)`

### create

    public static CLLClassifier[] create(CLLClassifierParameterSet params,
                                         LogPrior prior,
                                         ScoringFunction[]... functions)
                                  throws CloneNotSupportedException

  This method creates an array of `CLLClassifier`s by using the cross-product of the given `ScoringFunction`s.

  Parameters:
    `params` - the parameters that will be used in all classifiers
    `prior` - the prior that will be used in all classifiers
    `functions` - the `ScoringFunction`s
    1. `functions[i]` are the `ScoringFunction`s that can be used for class i
    2. `functions.length` has to be at least 2
  Returns:
    an array of `CLLClassifier`s
  Throws:
    `CloneNotSupportedException` - if some item could not be cloned

### getInstanceName

    public String getInstanceName()

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

  Overrides:
    `getInstanceName` in class `ScoreClassifier`
  Returns:
    a short description of 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