edu.cmu.minorthird.classify.semisupervised
Class MultinomialClassifier

java.lang.Object
  extended by edu.cmu.minorthird.classify.semisupervised.MultinomialClassifier
All Implemented Interfaces:
Classifier, SemiSupervisedClassifier, Visible, java.io.Serializable

public class MultinomialClassifier
extends java.lang.Object
implements SemiSupervisedClassifier, Classifier, Visible, java.io.Serializable

Author:
Edoardo Airoldi Date: Mar 15, 2004
See Also:
Serialized Form

Constructor Summary
MultinomialClassifier()
           
 
Method Summary
 void addValidLabel(ClassLabel label)
           
 ClassLabel classification(Instance instance)
          Return a predicted type for each element of the sequence.
 java.lang.String explain(Instance instance)
          Return some string that 'explains' the classification
 java.util.Iterator<Feature> featureIterator()
           
 Explanation getExplanation(Instance instance)
          Return an Explanation for the classification
 java.lang.String getFeatureModel(Feature feature)
           
 ClassLabel getLabel(int i)
           
 double getLogLikelihood(Example example)
           
 double getPrior()
           
 java.lang.String getUnseenModel()
           
 int indexOf(ClassLabel label)
           
 boolean isPresent(ClassLabel label)
           
 java.lang.Object[] keys()
           
 void reset()
           
 double[] score(Instance instance)
           
 void setClassParameter(int j, double probabilityOfOccurrence)
           
 void setFeatureGivenClassParameter(Feature f, int j, double probabilityOfOccurrence)
           
 void setFeatureModel(Feature feature, java.lang.String model)
           
 void setPrior(double pi)
           
 void setScale(double value)
           
 void setUnseenModel(java.lang.String str)
           
 Viewer toGUI()
          Create a view of this object
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultinomialClassifier

public MultinomialClassifier()
Method Detail

classification

public ClassLabel classification(Instance instance)
Description copied from interface: SemiSupervisedClassifier
Return a predicted type for each element of the sequence.

Specified by:
classification in interface Classifier
Specified by:
classification in interface SemiSupervisedClassifier

score

public double[] score(Instance instance)

explain

public java.lang.String explain(Instance instance)
Description copied from interface: SemiSupervisedClassifier
Return some string that 'explains' the classification

Specified by:
explain in interface Classifier
Specified by:
explain in interface SemiSupervisedClassifier

getExplanation

public Explanation getExplanation(Instance instance)
Description copied from interface: Classifier
Return an Explanation for the classification

Specified by:
getExplanation in interface Classifier

setScale

public void setScale(double value)

getPrior

public double getPrior()

setPrior

public void setPrior(double pi)

getUnseenModel

public java.lang.String getUnseenModel()

setUnseenModel

public void setUnseenModel(java.lang.String str)

getLogLikelihood

public double getLogLikelihood(Example example)

reset

public void reset()

isPresent

public boolean isPresent(ClassLabel label)

addValidLabel

public void addValidLabel(ClassLabel label)

getLabel

public ClassLabel getLabel(int i)

indexOf

public int indexOf(ClassLabel label)

setFeatureGivenClassParameter

public void setFeatureGivenClassParameter(Feature f,
                                          int j,
                                          double probabilityOfOccurrence)

setClassParameter

public void setClassParameter(int j,
                              double probabilityOfOccurrence)

setFeatureModel

public void setFeatureModel(Feature feature,
                            java.lang.String model)

getFeatureModel

public java.lang.String getFeatureModel(Feature feature)

featureIterator

public java.util.Iterator<Feature> featureIterator()

keys

public java.lang.Object[] keys()

toGUI

public Viewer toGUI()
Description copied from interface: Visible
Create a view of this object

Specified by:
toGUI in interface Visible

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object