-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Use check_scalar for parameters validation #20724
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
@adrinjalali @thomasjpfan do you think it is worth it? |
I'm in favor of consistent input validation, there's also some discussion here: #14721 |
So We might want to introduce the |
I'm all in favor. It's certainly an improvement. |
@glemaitre I'm interested in working on this issue, it would be my very first contribution. |
@architjen you could take an estimator and make the changes. You can have a look at #20723 I would like to merge #20723 first such that we have the |
As of now number = check_scalar(number, "number", Integral) What do you think? |
that's a fair point @jjerphan . I'd be happy to either return a value (in case of type conversions, e.g. int to float), or change the name to |
Hey I want to work on this issue. This will be my first contribution. |
I would also like to contribute to this issue. |
Hey @glemaitre and @adrinjalali! I would like to begin with this issue. I went through all the discussions available here & linked PRs too. Thanks and Regards, |
Hello @glemaitre, I am interested in contributing to this issue. Can you please assign it to me? |
Thank you everyone that is interested in the issue! Before we start working on other estimators, we should wait for #20723 to get merged. That PR makes adjustments to the error message and adds more API to |
Hello @glemaitre, I would like to work on this issue, this will be my first contribution to open-source and It would be amazing if you suggest how to proceed. |
Hello, I am a beginner and I would like to contribute to this project. It will be my first contribution to open source. Can you help me with this @glemaitre ? |
@NaYrA-IaR @nshah1503 please read the discussion on issues before asking if you can work on it. As you see in the comment here: #20724 (comment) you need to wait for another PR (pull request) to finish, before anyone can continue working on this issue. |
@glemaitre I am sorry if my mentioning of you here caused some inconvenience. I do understand you are fully occupied with your works. I am just requesting you to do so due to the curiosity of my contribution to scikit-learn! Thanks! |
I'm interested in working on this issue, it would be my very first contribution. |
is this issue still open, if yes can I start working on it? |
#20723 has been merged and can serve as an example to see which modifications are expected. This PR was modifying in the |
Working on |
Working on |
Hello @glemaitre @jjerphan ! As #20723 is now merged I'd like to work on this issue, this would be my very first contribution ! On which estimator / classifier would you like me to work on ? Do you have any suggestions / advices ? Thank you ! 🙏 |
@hvassard a part of this issue is to find places where this change would make sense. I suggest you start by looking at a few PRs linked here and see what they've done, and then have a look at the code base on different estimators, and see if you can fix any of them. It would also give you a better idea of how the code is organized :) |
@hvassard: thank you for your interest! I suggest you have a look at this comment which explains how to proceed #20724 (comment). |
Working on SpectralClustering |
Working on: file (class)
|
Working on |
Working on |
Hi everyone! I am trying to understand the range for |
@genvalen I think that's right.
|
@reshamas this is the traceback from the REPL for:
|
Since we pass |
Working on |
Hi all. I will be working on |
Closing in favor of #23462 |
I just discover that we have a helper function to validate scalar:
https://scikit-learn.org/stable/modules/generated/sklearn.utils.check_scalar.html
Since this helper could help to get consistent error types and messages, I was wondering if we could make a long-running issue to introduce this helper everywhere possible.
I think this could be a good issue for first contributors and short sprints.
I made an example PR that make the tool slightly more flexible:
#20723
For more detailed instructions on how to proceed with this issue, see issue #21927
The text was updated successfully, but these errors were encountered: