-------- Original message --------
From: Liam Geron
Date:01/25/2019 12:16 PM (GMT-08:00)
To: Scikit-learn mailing list
Subject: Re: [scikit-learn] Google Cloud ML Error

P(X) = 1/ (1 + exp(b0 + b1*X1 + ... + bn*Xn))

.. and solves for the b's using various solver routines. For a specific project, I'd like to bound the regression equation between 0-a (instead of 0-1) and add a variable c to center an independent variable Xk, e.g.

P(X) = a / (1 + exp(b0 + b1*X1 + .. + bn*Xn) * (Xk - c)))

... and solve for a, b's and c. Any thoughts/ideas on how to modify logistic.py to achieve this? I thought of modifying the expit function to reflect the changed equation. But how do a let the solvers know to also include the new variables a and c? Any scripts available that are able to handle my modified logistic regression equation? -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.nothman at gmail.com Thu Jan 31 05:48:43 2019 From: joel.nothman at gmail.com (Joel Nothman) Date: Thu, 31 Jan 2019 21:48:43 +1100 Subject: [scikit-learn] Bounded logistical regression in Python In-Reply-To: References: Message-ID: I don't quite get your terminology, to "add a variable c to center an independent variable Xk", and you've got an extra ) in your equation, so I'm not sure exactly where you want it... If you mean P(X) = a / (1 + exp(b0 + b1*X1 + .. + bn*Xn) * (Xk - c)) then that's the same as P(X) = a / (1 + exp(b0 + b1*X1 + .. + bn*Xn + log(Xk)/log(c)) replace c by exp(1/bk) and you've got the same old logistic regression, haven't you? On Thu, 31 Jan 2019 at 20:53, Jaap van Kampen wrote: > Hi there! > The standard logistical regression solver > > in scikit-learn assumes the regression equation:

> P(X) = 1/ (1 + exp(b0 + b1*X1 + ... + bn*Xn))

> .. and solves for the b's using various solver routines. > > For a specific project, I'd like to bound the regression equation between > 0-a (instead of 0-1) and add a variable c to center an independent variable > Xk, e.g.

> P(X) = a / (1 + exp(b0 + b1*X1 + .. + bn*Xn) * (Xk - c)))

> ... and solve for a, b's and c. > > Any thoughts/ideas on how to modify logistic.py to achieve this? I thought > of modifying the expit > function > to reflect the changed equation. But how do a let the solvers know to also > include the new variables a and c? Any scripts available that are able to > handle my modified logistic regression equation? > > _______________________________________________ > scikit-learn mailing list > scikit-learn at python.org > https://mail.python.org/mailman/listinfo/scikit-learn > -------------- next part -------------- An HTML attachment was scrubbed... URL: