Re: [Scikit-learn-general] set sample weights in Pipeline?

2013-01-10 Thread Jaques Grobler
Hi there.. I'm not sure if you have been answered yet.. so perhaps I can help MultinomialNB has a parameter called `class_weight` which you can set at initialization. | class_weight : array-like, size=[n_classes,] | Prior probabilities of the classes. If specified the priors are not |

Re: [Scikit-learn-general] set sample weights in Pipeline?

2013-01-10 Thread Gilles Louppe
... or more simply: pipeline.fit(X, y, nb__sample_weight=sample_weight) On 10 January 2013 15:20, Gilles Louppe g.lou...@gmail.com wrote: Hi, I don't know how it interfaces with NLTK's SklearnClassifier, but if you can work your way using only Scikit-Learn for training, then can you pass

[Scikit-learn-general] set sample weights in Pipeline?

2012-12-22 Thread Jieyun Fu
Hi all, I found this piece of code (from herehttp://stackoverflow.com/questions/10098533/implementing-bag-of-words-naive-bayes-classifier-in-nltk), which basically tries to classify movie reviews into positive and negative. Now I need to put in weights for positive and negative reviews (for