| Home | Trees | Indices | Help |
|
|---|
|
|
ClassifyI --+
|
AbstractClassify --+
|
Cosine
The Cosine Classifier uses the cosine distance algorithm to compute
the distance between the sample document and each of the specified classes.
A cosine classifier needs to be trained with representative examples
of each class. From these examples the classifier
calculates the most probable classification of the sample.
C . S
D(C|S) = -------------------------
sqroot(C^2) * sqroot (S^2)
Internal data structures:
_feature_dectector:
holds a feature detector function
_classes:
holds a list of classes supplied during training
_cls_freq_dist:
holds a dictionary of Frequency Distributions,
this structure is defined in probabilty.py in nltk_lite
this structure is indexed by class names and feature types
the frequency distributions are indexed by feature values
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Train classifier using representative examples of classes; creates frequency distributions of these classes
|
|
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Wed May 16 22:47:23 2007 | http://epydoc.sourceforge.net |