I want to save the result of TfidfVectorizer in sklearn.feature_extraction.text into a text file for future use. As I found, it is a sparse matrix of type ''. However when I try to save it using the following code

np.savetxt('Feature_TfIdf.txt', X_Tfidf, fmt='%2.6f')

I get an error like this

IndexError: tuple index out of range

asked Jul 04 '14 at 01:04

Mohammad%20Akbari's gravatar image

Mohammad Akbari
1123

Be the first one to answer this question!
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.