Re: [Scikit-learn-general] Question on KFold CV and an error with Naive Bayes classifiers

2011-10-27 Thread Lars Buitinck
2011/10/27 SK Sn : > Hi all, I was playing around with KFold CV and found I need to transfer an X > (scipy sparse matrix after text vectorization) by todense() in order to work > with Kfold CV using following code: > > for train_index, test_index in kf: >     X_train, X_test = X[train_index],

[Scikit-learn-general] Question on KFold CV and an error with Naive Bayes classifiers

2011-10-27 Thread SK Sn
Hi all, I was playing around with KFold CV and found I need to transfer an X (scipy sparse matrix after text vectorization) by todense() in order to work with Kfold CV using following code: for train_index, test_index in kf: X_train, X_test = X[train_index], X[test_index] y_train, y_te