Re: [Scikit-learn-general] LogisticRegression: sample vs class weights

2015-04-21 Thread Olivier Grisel
Yes, according to the code it does not support sample_weight but just class_weight. -- Olivier -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standa

Re: [Scikit-learn-general] LogisticRegression: sample vs class weights

2015-04-21 Thread Andreas Mueller
That is for class weights, not sample weights, right? On 04/21/2015 04:03 AM, Olivier Grisel wrote: > The docstring is not accurate: it does not resample, but instead > reweight C for each class: > > https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/src/liblinear/linear.cpp#L239

Re: [Scikit-learn-general] LogisticRegression: sample vs class weights

2015-04-21 Thread Olivier Grisel
The docstring is not accurate: it does not resample, but instead reweight C for each class: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/src/liblinear/linear.cpp#L2395 Feel free to send an PR to fix the docstring. -- Olivier -

Re: [Scikit-learn-general] LogisticRegression: sample vs class weights

2015-04-21 Thread iBayer
@Mathieu http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/#weights_for_data_instances So, if class weights are available why sub/oversample? 2015-04-21 3:34 GMT+02:00 Mathieu Blondel : > Last time I checked, liblinear didn't support sample weights, just class > weights (one for positive samples and

Re: [Scikit-learn-general] LogisticRegression: sample vs class weights

2015-04-20 Thread Mathieu Blondel
Last time I checked, liblinear didn't support sample weights, just class weights (one for positive samples and another for negative samples). Mathieu On Tue, Apr 21, 2015 at 5:56 AM, iBayer wrote: > Hi, > I was surprised to read that class weights are implemented via sampling > for LogisticReg

[Scikit-learn-general] LogisticRegression: sample vs class weights

2015-04-20 Thread iBayer
Hi, I was surprised to read that class weights are implemented via sampling for LogisticRegression, is this really the case? from the LR doc --- class_weight : {dict, 'auto'}, optional Over-/undersamples the samples of each class according to the given weights. If not given, a