Denzil Correa
2011-04-30 21:42:07 UTC
Hi all,
I would like to convert a NLTK feature set (each data point as a *list* with
a 2-*tuple* value where the first tuple value is the feature set and the
second tuple value is the class label) to scikits.learn numpy array feature
sets. My NLTK feature sets consist of a combination of multiple feature sets
including word unigrams, word bigrams, word trigrams, character unigrams,
character bigrams, character trigrams, frequency of punctuations, frequency
of function words, frequency of letters, frequency of special characters and
80-100 more such features.
There are multiple issues including : index-feature mapping and order
preservation since, target labels need to be stored in a separate array.
Is there a quick & efficient way to convert to the feature set
representation in scikits.learn? I moved over to scikits.learn to test the
accuracy of SVM's on my text classification task. Also, it would be really
helpful to the community to have such quick shifts between these two
frameworks/libraries.
Thanks!
I would like to convert a NLTK feature set (each data point as a *list* with
a 2-*tuple* value where the first tuple value is the feature set and the
second tuple value is the class label) to scikits.learn numpy array feature
sets. My NLTK feature sets consist of a combination of multiple feature sets
including word unigrams, word bigrams, word trigrams, character unigrams,
character bigrams, character trigrams, frequency of punctuations, frequency
of function words, frequency of letters, frequency of special characters and
80-100 more such features.
There are multiple issues including : index-feature mapping and order
preservation since, target labels need to be stored in a separate array.
Is there a quick & efficient way to convert to the feature set
representation in scikits.learn? I moved over to scikits.learn to test the
accuracy of SVM's on my text classification task. Also, it would be really
helpful to the community to have such quick shifts between these two
frameworks/libraries.
Thanks!
--
Regards,
Denzil Correa
Ph.D Scholar
Indraprastha Institute of Information Technology, Delhi
http://www.iiitd.ac.in/
Regards,
Denzil Correa
Ph.D Scholar
Indraprastha Institute of Information Technology, Delhi
http://www.iiitd.ac.in/