<div dir="ltr">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 <div><br></div><div>P(X) = a / (1 + exp(b0 + b1*X1 + .. + bn*Xn) * (Xk - c))</div><div><br></div><div>then that's the same as</div><div><br></div><div>P(X) = a / (1 + exp(b0 + b1*X1 + .. + bn*Xn + log(Xk)/log(c))<br></div><div><br></div><div>replace c by exp(1/bk) and you've got the same old logistic regression, haven't you?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 31 Jan 2019 at 20:53, Jaap van Kampen <<a href="mailto:jaapvankampen@gmail.com">jaapvankampen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi there!</div><div>The<a href="https://github.com/scikit-learn/scikit-learn/blob/7389dba/sklearn/linear_model/logistic.py#L998" target="_blank"> standard logistical regression solver</a> in scikit-learn assumes the regression equation:<p></div><div>P(X) = 1/ (1 + exp(b0 + b1*X1 + ... + bn*Xn))</p></div><div>.. and solves for the b's using various solver routines. </div><div><br></div><div>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></div><div>P(X) = a / (1 + exp(b0 + b1*X1 + .. + bn*Xn) * (Xk - c))) </p></div><div>... and solve for a, b's and c.</div><div><br></div><div>Any thoughts/ideas on how to modify logistic.py to achieve this? I thought of modifying the <a href="https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.special.expit.html" target="_blank">expit </a>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?</div><div><br></div></div></div>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div>