|
||||||||||
| 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.scoringFunctionBased.ScoreClassifier
de.jstacs.classifier.scoringFunctionBased.cll.CLLClassifier
public class CLLClassifier
This class implements the conditional log likelihood (CLL) classifier.
| 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, params, score, sostream |
| Constructor Summary | |
|---|---|
CLLClassifier(CLLClassifierParameterSet params,
LogPrior prior,
ScoringFunction... score)
The default constructor. |
|
CLLClassifier(CLLClassifierParameterSet params,
ScoringFunction... score)
The default constructor. |
|
CLLClassifier(StringBuffer xml)
This is the constructor for the interface Storable. |
|
| Method Summary | |
|---|---|
CLLClassifier |
clone()
|
static CLLClassifier[] |
create(CLLClassifierParameterSet params,
LogPrior prior,
ScoringFunction[]... functions)
This method creates an array of CLLClassifiers by using the
cross-product of the given ScoringFunctions. |
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. |
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 |
|---|
protected LogPrior prior
| Constructor Detail |
|---|
public CLLClassifier(CLLClassifierParameterSet params,
ScoringFunction... score)
throws CloneNotSupportedException
params - the parameter set for the classifierscore - the ScoringFunctions for the classes
CloneNotSupportedException - if at least one ScoringFunction could not be cloned
public CLLClassifier(CLLClassifierParameterSet params,
LogPrior prior,
ScoringFunction... score)
throws CloneNotSupportedException
params - the parameter set for the classifierprior - the prior that shall be usedscore - the ScoringFunctions for the classes
CloneNotSupportedException - if at least one ScoringFunction could not be cloned
public CLLClassifier(StringBuffer xml)
throws NonParsableException
Storable.
xml - the XML representation
NonParsableException - if the representation could not be parsed.| Method Detail |
|---|
public CLLClassifier clone()
throws CloneNotSupportedException
clone in class ScoreClassifierCloneNotSupportedException
protected NormConditionalLogLikelihood getFunction(Sample[] data,
double[][] weights)
throws Exception
ScoreClassifier
getFunction in class ScoreClassifierdata - the samplesweights - the weights of the sequences of the samples
Exception - if something went wrongpublic void setPrior(LogPrior prior)
ScoreClassifier.hasBeenOptimized() will return false
after invoking this method.
prior - the new priorprotected String getXMLTag()
AbstractClassifierString that is used as tag for the XML
representation. This method is used by the methods
AbstractClassifier.fromXML(StringBuffer) and AbstractClassifier.toXML().
getXMLTag in class ScoreClassifierString that is used as tag for the XML representationprotected StringBuffer getFurtherClassifierInfos()
AbstractClassifierStringBuffer. This method is used by the method AbstractClassifier.toXML()
and should not be made public.
getFurtherClassifierInfos in class ScoreClassifierStringBuffer
protected void extractFurtherClassifierInfosFromXML(StringBuffer xml)
throws NonParsableException
AbstractClassifierAbstractClassifier.fromXML(StringBuffer) and
should not be made public.
extractFurtherClassifierInfosFromXML in class ScoreClassifierxml - XML representation
NonParsableException - if the information could not be parsed out of the
StringBuffer
public static CLLClassifier[] create(CLLClassifierParameterSet params,
LogPrior prior,
ScoringFunction[]... functions)
throws CloneNotSupportedException
CLLClassifiers by using the
cross-product of the given ScoringFunctions.
params - the parameters that will be used in all classifiersprior - the prior that will be used in all classifiersfunctions - the ScoringFunctions
functions[i] are the ScoringFunctions
that can be used for class i
functions.length has to be at least 2
CLLClassifiers
CloneNotSupportedException - if some item could not be clonedpublic String getInstanceName()
AbstractClassifier
getInstanceName in class ScoreClassifier
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||