edu.stanford.nlp.classify
Class LogisticClassifier
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogisticClassifier
public LogisticClassifier()
LogisticClassifier
public LogisticClassifier(boolean biased)
LogisticClassifier
public LogisticClassifier(LogPrior prior)
LogisticClassifier
public LogisticClassifier(LogPrior prior,
boolean biased)
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