nltk/nltk — Issue #171: Add scalar support to classifiers
Author: alexrudnick
Created: 2012-01-17 06:27:42+00:00
State: open

Not all the classifiers available through NLTK support scalar feature types. The default, in SVM and MaxEnt, is to treat float and int value variations throughout a feature set as discrete and independent - that is, a value of 2.0 is no more related to a value of 1.9 than it is to 70.4. It would be helpful for some applications if this sometimes-unintuitive behaviour could be rectified, and a classifier option made available for treating all features types as discrete or for treating ints and floats as scalars.

Classifiers affected:
- SVM
- MaxEnt
- DecisionTree

Unsure about the others.

I'm not sure that after such support is added, it should become the default behaviour to treat int and float features as scalars - there may be some applications that expect the current behaviour.

Migrated from http://code.google.com/p/nltk/issues/detail?id=698