edu.stanford.nlp.classify
Class LogisticClassifier

java.lang.Object
  extended by edu.stanford.nlp.classify.LogisticClassifier
All Implemented Interfaces:
Classifier, RVFClassifier, Serializable

public class LogisticClassifier
extends Object
implements Classifier, Serializable, RVFClassifier

A classifier for binary logistic regression problems. This uses the standard statistics textbook formulation of binary logistic regression, which is more efficient than using the LinearClassifier class.

Author:
Galen Andrew
See Also:
Serialized Form

Constructor Summary
LogisticClassifier()
           
LogisticClassifier(boolean biased)
           
LogisticClassifier(LogPrior prior)
           
LogisticClassifier(LogPrior prior, boolean biased)
           
 
Method Summary
 Object classOf(Collection features)
           
 Object classOf(Counter features)
           
 Object classOf(Datum datum)
           
 Object classOf(RVFDatum example)
           
 Collection labels()
           
static void main(String[] args)
           
 double probabilityOf(Collection features, Object label)
           
 double probabilityOf(Counter features, Object label)
           
 double probabilityOf(Datum example)
           
 double probabilityOf(RVFDatum example)
           
 double scoreOf(Collection features)
           
 double scoreOf(Counter<String> features)
           
 Counter scoresOf(Datum datum)
           
 Counter scoresOf(RVFDatum example)
           
 void train(GeneralDataset data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogisticClassifier

public LogisticClassifier()

LogisticClassifier

public LogisticClassifier(boolean biased)

LogisticClassifier

public LogisticClassifier(LogPrior prior)

LogisticClassifier

public LogisticClassifier(LogPrior prior,
                          boolean biased)
Method Detail

labels

public Collection labels()
Specified by:
labels in interface Classifier

classOf

public Object classOf(Collection features)

scoreOf

public double scoreOf(Collection features)

scoresOf

public Counter scoresOf(Datum datum)
Specified by:
scoresOf in interface Classifier

classOf

public Object classOf(Datum datum)
Specified by:
classOf in interface Classifier

classOf

public Object classOf(Counter features)

scoreOf

public double scoreOf(Counter<String> features)

classOf

public Object classOf(RVFDatum example)
Specified by:
classOf in interface RVFClassifier

scoresOf

public Counter scoresOf(RVFDatum example)
Specified by:
scoresOf in interface RVFClassifier

probabilityOf

public double probabilityOf(Datum example)

probabilityOf

public double probabilityOf(Collection features,
                            Object label)

probabilityOf

public double probabilityOf(RVFDatum example)

probabilityOf

public double probabilityOf(Counter features,
                            Object label)

train

public void train(GeneralDataset data)

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Stanford NLP Group