-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
RobustScaler does not allow sparse matrix input #8796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What you are saying seems to be right. Can you provide an minimal example to be certain of the behavior. |
or just submit a fix
…On 26 Apr 2017 8:56 am, "Guillaume Lemaitre" ***@***.***> wrote:
What you are saying seems to be right. Can you provide an minimal example
to be certain of the behavior.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8796 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz60kVWT_EA3uZqqXGjKcLP1Hf4FXwks5rznoSgaJpZM4NIJpE>
.
|
I'm assuming it's just removing the lines that raise the exception and adding a test? I should be able to submit a PR in the next day or two. |
The issue is clarifying class documentation of (Note a typo here) http://scikit-learn.org/stable/modules/preprocessing.html#scaling-sparse-data
See also #4125 (comment) - |
A PR would be more than welcome.
@naoyak can you clarify what you mean by typo ? |
RobustScaler
raises aTypeError
when callingfit
with a sparse matrix as input, despite the docs indicating that using a sparse matrix is feasible as long aswith_centering=False
. Looks like thefit
method is blocking any sparse matrix input with an if statement:Link to line of code that raises: https://github.com/scikit-learn/scikit-learn/blob/14031f6/sklearn/preprocessing/data.py#L1004
I can provide some code to reproduce if necessary, but I want to make sure this makes sense first. Thanks!
The text was updated successfully, but these errors were encountered: