You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use scipy.special.expit for the inverse of the logit function #12914
I would be happy to take it too depending of @qdeffense 's preference. This was my first time working on a project of this scale so it was a good experience for me. I am happy to defer either way.
I just want to go over how you would fix this. I've never submitted to Open Source before. So I would like to convey my thought process on how I would solve this issue. I'm not going to start working on contributing here until I feel confident enough (even for first time help wanted tags)
I would go to as many .py files in the folder as I can to find the code that represents the inverse of the logit function and replace it with expit(y). I think if you're using an editor like Atom, and you have a text, it can search over an entire project folder for a specific sequence of text?
Would this one of the ways you would go about resolving the issue?
@AbhishekBabuji , your idea looks very reasonable to me although I have never used Atom myself so I cannot speak to it specifically. If I were to go about checking, I would use something like grep to find all usages of np.exp (or some similar regex).
Also if you have something in the code like 1. / (1. + np.exp(f(x))) you would need to replace it with expit(-f(x)) (observe the negation).
@qdeffense - Can you let me know if you already started on this? If you haven't, I will begin working on it straightaway. If I do not hear by Monday, I will jump on it then. Please let me know.
@ZaydH I just found 2 more files where the function is implemented :
benchmarks/bench_rcv1_logreg_convergence.py : L28
and
sklearn/linear_model/tests/test_sag.py : L45
I'll keep looking with a wider search
Can you do the changes ? I have troubles building the project so I won't be able to run tests until I fix my problem
@qdeffense@ZaydH I found some more files like sklearn/linear_model/plot_logistic.py , benchmarks/bench_isotonic.py, sklearn/ensemble/tests/test_gradient_boosting.py, sklearn/tests/test_isotonic.py, examples/ensemble/plot_gradient_boosting_oob.py where the function can be implemented and have made a PR. @qdeffensebenchmarks/bench_rcv1_logreg_convergence.py : L28 and sklearn/linear_model/tests/test_sag.py : L45 are different than expit() but can be implemented as 1 / expit(). Should it be done that way @ZaydH@rth ?
@RonLek This issue was worked on by @ZaydH and @qdeffense as you can see from the discussion above. It's not ideal that you made a PR for it #12931, ignoring that discussion.
We will merge that to avoid redundant work, but please don't do that next time.
@ZaydH@qdeffense There is also a number of other open issues or stalled PRs were your contribution would be appreciated.
Activity
qdeffense commentedon Jan 3, 2019
I can take this if nobody is on it
rth commentedon Jan 3, 2019
Sure, thanks @qdeffense.
ZaydH commentedon Jan 3, 2019
I would be happy to take it too depending of @qdeffense 's preference. This was my first time working on a project of this scale so it was a good experience for me. I am happy to defer either way.
AbhishekBabuji commentedon Jan 5, 2019
I just want to go over how you would fix this. I've never submitted to Open Source before. So I would like to convey my thought process on how I would solve this issue. I'm not going to start working on contributing here until I feel confident enough (even for first time help wanted tags)
I would go to as many
.pyfiles in the folder as I can to find the code that represents the inverse of the logit function and replace it withexpit(y). I think if you're using an editor like Atom, and you have a text, it can search over an entire project folder for a specific sequence of text?Would this one of the ways you would go about resolving the issue?
ZaydH commentedon Jan 5, 2019
@AbhishekBabuji , your idea looks very reasonable to me although I have never used Atom myself so I cannot speak to it specifically. If I were to go about checking, I would use something like
grepto find all usages ofnp.exp(or some similar regex).Also if you have something in the code like
1. / (1. + np.exp(f(x)))you would need to replace it withexpit(-f(x))(observe the negation).ZaydH commentedon Jan 5, 2019
@qdeffense - Can you let me know if you already started on this? If you haven't, I will begin working on it straightaway. If I do not hear by Monday, I will jump on it then. Please let me know.
qdeffense commentedon Jan 6, 2019
@ZaydH I just found 2 more files where the function is implemented :
benchmarks/bench_rcv1_logreg_convergence.py : L28
and
sklearn/linear_model/tests/test_sag.py : L45
I'll keep looking with a wider search
Can you do the changes ? I have troubles building the project so I won't be able to run tests until I fix my problem
RonLek commentedon Jan 6, 2019
@qdeffense @ZaydH I found some more files like
sklearn/linear_model/plot_logistic.py,benchmarks/bench_isotonic.py,sklearn/ensemble/tests/test_gradient_boosting.py,sklearn/tests/test_isotonic.py,examples/ensemble/plot_gradient_boosting_oob.pywhere the function can be implemented and have made a PR.@qdeffense
benchmarks/bench_rcv1_logreg_convergence.py : L28andsklearn/linear_model/tests/test_sag.py : L45are different thanexpit()but can be implemented as1 / expit(). Should it be done that way @ZaydH @rth ?rth commentedon Jan 7, 2019
@RonLek This issue was worked on by @ZaydH and @qdeffense as you can see from the discussion above. It's not ideal that you made a PR for it #12931, ignoring that discussion.
We will merge that to avoid redundant work, but please don't do that next time.
@ZaydH @qdeffense There is also a number of other open issues or stalled PRs were your contribution would be appreciated.
RonLek commentedon Jan 7, 2019
Apologies @rth @qdeffense @ZaydH .
It was my first time working on such a big repo. I'll keep that in mind. Thank you.