| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
api.ClassifierI --+
|
MaxentClassifier
A maximum entropy classifier (also known as a conditional exponential classifier). This
classifier is parameterized by a set of weights, which are used to combine the
joint-features that are generated from a featureset by an encoding. In
particular, the encoding maps each (featureset, label) pair
to a vector. The probability of each label is then computed using the
following equation:
dotprod(weights, encode(fs,label))
prob(fs|label) = ---------------------------------------------------
sum(dotprod(weights, encode(fs,l)) for l in labels)
Where dotprod is the dot product:
dotprod(a,b) = sum(x*y for (x,y) in zip(a,b))
|
|||
|
|||
list of (immutable)
|
|
||
|
|||
list of float
|
|
||
| label |
|
||
| ProbDistI |
|
||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
| Deprecated | |||
|---|---|---|---|
|
Inherited from |
|||
|
|||
| MaxentClassifier |
|
||
|
|||
ALGORITHMS = A list of the algorithm names that are accepted for the train() method's algorithm parameter.
|
|||
_SCIPY_ALGS =
|
|||
|
|||
|
Inherited from |
|||
|
|||
Construct a new maxent classifier model. Typically, new classifier models are created using the train() method.
|
|
Set the feature weight vector for this classifier.
|
|
|
|
|
repr(x)
|
Train a new maxent classifier based on the given corpus of training samples. This classifier will have its weights chosen to maximize entropy while remaining empirically consistent with the training corpus.
|
|
|||
ALGORITHMSA list of the algorithm names that are accepted for the train() method's
|
_SCIPY_ALGS
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Wed Aug 27 15:08:52 2008 | http://epydoc.sourceforge.net |