Thanks Sebastian.

I am trying to follow this paper:
http://research.microsoft.com/en-us/um/people/mattri/papers/www2007/predictingclicks.pdf
(check out section 6.2). They use logistic regression as a regression model
to predict the click through rate (which is continuous).

A linear regression model will violate the assumption that probabilities
vary between 0 and 1 (it will give me values outside this range in some
cases). I would think it is in principle possible to solve the logistic
regression for a continuous value, although scikit doesn't support it.
Perhaps I'm wrong.

Thanks again,

George.


On Sat, Oct 3, 2015 at 10:50 PM, Sebastian Raschka <se.rasc...@gmail.com>
wrote:

> Hi, George,
> logistic regression is a binary classifier by nature (class labels 0 and
> 1). Scikit-learn supports multi-class classification via One-vs-One or
> One-vs-All though; and there is a generalization (softmax) that gives you
> meaningful probabilities for multiple classes (i.e., class probabilities
> sum up to 1). In any case, logistic regression works with nominal class
> labels - categorical class labels with no order implied.
>
> To keep a long story short: Logistic regression is a classifier, not a
> regressor — the name is misleading, I agree. I think you may want to look
> into regression analysis for your continuous target variable.
>
> Best,
> Sebastian
>
> > On Oct 3, 2015, at 9:58 PM, George Bezerra <gbeze...@gmail.com> wrote:
> >
> > Hi there,
> >
> > I would like to train a logistic regression model on a continuous (i.e.,
> not categorical) target variable. The target is a probability, which is why
> I am using a logistic regression for this problem. However, the sklearn
> function tries to find the class labels by running a unique() on the target
> values, which is disastrous if y is continuous.
> >
> > Is there a way to train logistic regression on a continuous target
> variable in sklearn?
> >
> > Any help is highly appreciated.
> >
> > Best,
> >
> > George.
> >
> > --
> > George Bezerra
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Scikit-learn-general mailing list
> > Scikit-learn-general@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>



-- 
George Bezerra
------------------------------------------------------------------------------
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to