|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.classify.LogisticClassifier<L,F>
L
- The type of the labels in the DatasetF
- The type of the features in the Datasetpublic class LogisticClassifier<L,F>
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.
justificationOf(Collection)
Constructor Summary | |
---|---|
LogisticClassifier()
Deprecated. |
|
LogisticClassifier(boolean biased)
Deprecated. |
|
LogisticClassifier(double[] weights,
Index<F> featureIndex,
L[] classes)
|
|
LogisticClassifier(LogPrior prior)
Deprecated. |
|
LogisticClassifier(LogPrior prior,
boolean biased)
Deprecated. |
Method Summary | |
---|---|
L |
classOf(Collection<F> features)
|
L |
classOf(Counter<F> features)
|
L |
classOf(Datum<L,F> datum)
|
L |
classOf(RVFDatum<L,F> example)
Deprecated. |
Index<F> |
getFeatureIndex()
|
L |
getLabelForInternalNegativeClass()
|
L |
getLabelForInternalPositiveClass()
|
double[] |
getWeights()
|
Counter<F> |
justificationOf(Collection<F> features)
returns the weights assigned by the classifier to each feature |
Counter<F> |
justificationOf(Counter<F> features)
|
Collection<L> |
labels()
|
static void |
main(String[] args)
|
double |
probabilityOf(Collection<F> features,
L label)
|
double |
probabilityOf(Counter<F> features,
L label)
|
double |
probabilityOf(Datum<L,F> example)
|
double |
probabilityOf(RVFDatum<L,F> example)
Deprecated. |
double |
scoreOf(Collection<F> features)
|
double |
scoreOf(Counter<F> features)
|
Counter<L> |
scoresOf(Datum<L,F> datum)
returns the scores for both the classes |
Counter<L> |
scoresOf(RVFDatum<L,F> example)
Deprecated. |
String |
toString()
|
void |
train(GeneralDataset<L,F> data)
Deprecated. |
void |
train(GeneralDataset<L,F> data,
double l1reg,
double tol)
Deprecated. |
void |
trainWeightedData(GeneralDataset<L,F> data,
float[] dataWeights)
Deprecated. |
Counter<String> |
weightsAsCounter()
|
Counter<F> |
weightsAsGenericCounter()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LogisticClassifier(double[] weights, Index<F> featureIndex, L[] classes)
@Deprecated public LogisticClassifier()
@Deprecated public LogisticClassifier(boolean biased)
@Deprecated public LogisticClassifier(LogPrior prior)
@Deprecated public LogisticClassifier(LogPrior prior, boolean biased)
Method Detail |
---|
public String toString()
toString
in class Object
public L getLabelForInternalPositiveClass()
public L getLabelForInternalNegativeClass()
public Counter<String> weightsAsCounter()
public Counter<F> weightsAsGenericCounter()
public Index<F> getFeatureIndex()
public double[] getWeights()
public Collection<L> labels()
labels
in interface Classifier<L,F>
public L classOf(Datum<L,F> datum)
classOf
in interface Classifier<L,F>
@Deprecated public L classOf(RVFDatum<L,F> example)
classOf
in interface RVFClassifier<L,F>
public L classOf(Counter<F> features)
public L classOf(Collection<F> features)
public double scoreOf(Collection<F> features)
public double scoreOf(Counter<F> features)
public Counter<F> justificationOf(Counter<F> features)
public Counter<F> justificationOf(Collection<F> features)
public Counter<L> scoresOf(Datum<L,F> datum)
scoresOf
in interface Classifier<L,F>
@Deprecated public Counter<L> scoresOf(RVFDatum<L,F> example)
scoresOf
in interface RVFClassifier<L,F>
public double probabilityOf(Datum<L,F> example)
public double probabilityOf(Collection<F> features, L label)
@Deprecated public double probabilityOf(RVFDatum<L,F> example)
public double probabilityOf(Counter<F> features, L label)
@Deprecated public void trainWeightedData(GeneralDataset<L,F> data, float[] dataWeights)
dataWeights
- weights of the data.@Deprecated public void train(GeneralDataset<L,F> data)
@Deprecated public void train(GeneralDataset<L,F> data, double l1reg, double tol)
public static void main(String[] args) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |