CoreNLP icon indicating copy to clipboard operation
CoreNLP copied to clipboard

Use tfidf as a better scoring function for trimming features (vs applyFeatureCountThreshold)

Open InputNeuron opened this issue 10 years ago • 0 comments

There are to features in GeneralDataset for using the dimensionality of the feature vector.

applyFeatureCountThreshold and applyFeatureMaxCountThreshold

However, these might be somewhat naive.

Wouldn't it be better to compute the tfidf score of all the features and then just trim to remove <= 80th percentile. (give or take).

This would be much better than computing a rough 'count' as you would need to know what reasonable counts look like before.

Further, tfidf would prefer terms that are generally very valuable for the classifier to use to predict these classes.

Once could compute the tfidf per document or per label and this is super fast to compute in RAM.. probably only adding say 1% of the classification time.

InputNeuron avatar Oct 24 '16 21:10 InputNeuron