Re: [Scikit-learn-general] 'SklearnClassifier' object has no attribute '_feature_index': any suggestions to fix it?

2014-01-03 Thread Marco Ippolito
Thanks Lars. Kind regards. Marco 2014/1/3 Lars Buitinck : > 2014/1/3 Marco Ippolito : >> since I'm a newbie to sklearn-nltk interface, >> would you be so kind in telling me how to do it? > > Use the train method [1]. The docs describe what the input should look like. > > [1] > http://nltk.org/ap

Re: [Scikit-learn-general] 'SklearnClassifier' object has no attribute '_feature_index': any suggestions to fix it?

2014-01-03 Thread Lars Buitinck
2014/1/3 Marco Ippolito : > since I'm a newbie to sklearn-nltk interface, > would you be so kind in telling me how to do it? Use the train method [1]. The docs describe what the input should look like. [1] http://nltk.org/api/nltk.classify.html#nltk.classify.scikitlearn.SklearnClassifier.train

Re: [Scikit-learn-general] 'SklearnClassifier' object has no attribute '_feature_index': any suggestions to fix it?

2014-01-03 Thread Marco Ippolito
Lars Buitinck writes: > > 2014/1/2 Marco Ippolito : > > pipeline = Pipeline([('tfidf', TfidfTransformer()), ('chi2', > > SelectKBest(chi2, k=1000)), ('nb', Multin\ > > omialNB())]) > > > > classif = SklearnClassifier(pipeline) > > print("Accuracy of MultinomialNaiveBayesClassifier with pipeline