#386 LogisticRegression.predict_proba should return (n, 2) for binary#760
Conversation
…nary classification
|
I'm not quite sure why some of the checks are failing. It seems one of them is due to:
but I'm not quite sure what I can change to make the check pass? |
|
That wouldn’t be related to this PR, but indicates that NumPy may be being installed twice? If you’re able to debug that it’d be appreciated.
… On Nov 25, 2020, at 15:12, Aaron Richter ***@***.***> wrote:
I'm not quite sure why some of the checks are failing. It seems one of them is due to:
##[warning]numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
but I'm not quite sure what I can change to make the check pass?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
Looks like test failures have been addressed, besides linting (thanks @jsignell 🎉 ). I think this should be ready to merge if the implementation looks good |
Might not be quite done yet, but I'm chipping away at it. |
|
Seems like only the keras test is broken and that'll be fixed by #794, so good to merge? |
|
Triggered the tests to run again, so I think all is good now! Can this be merged? |
TomAugspurger
left a comment
There was a problem hiding this comment.
Thanks! This has dragged on long enough (sorry) so I'm going to merge. But if you want to make a cleanup PR you could simplify things to just call np.vstack on the array. Thanks to NEP-18 it works on Dask Arrays too.
| return X.assign(intercept=1)[["intercept"] + list(columns)] | ||
|
|
||
|
|
||
| @dispatch(np.ndarray) # noqa: F811 |
There was a problem hiding this comment.
We can actually just use np.vstack now, since Dask implemented NEP 18.
This PR addresses #386 by making sure
LogisticRegression.predict_proba()returns an array of shape(n, 2)to match what scikit-learn does. There are some things currently hard-coded for binary classification only, but it is clear that multi-class is currently not supported so that can be changed when multi-class is implemented.There is some risk here that if users have downstream code that depends on the current functionality (return shape of
(n,)), the changes from this PR could break their code.