MAINT validate parameters in TSNE - #23845
Conversation
| "min_grad_norm": [Real], | ||
| "metric": [StrOptions(set(_VALID_METRICS) | {"precomputed"}), callable], | ||
| "metric_params": [dict, None], | ||
| "init": [StrOptions({"pca", "random", "warn"}), np.ndarray], |
There was a problem hiding this comment.
Same here about hiding "warn". Note you'll have to format this properly.
| "init": [StrOptions({"pca", "random", "warn"}), np.ndarray], | |
| "init": [StrOptions({"pca", "random"}), Hidden(StrOptions({"warn"})), np.ndarray], |
|
@Micky774 Thank you for your comments and suggestions :) |
|
Currently failing the |
|
Alternatively, we could allow perplexity < 1 to not break backward compat and reconsider this issue when changing the lower bound in a separate PR |
Sounds good, no need to hold up this PR |
|
I changed the interval of the perplexity to allow perplexity < 1. @Micky774 |
I'm not sure what you're referring to here -- the tests pass on both |
I think it is a misunderstanding from my side. which throws the error below: But when running the tests with pytest: |
|
Regarding why our common tests pass: before running that check we set the parameters of the estimators to values that won't raise errors for it, e.g. in this case we actually explicity set the
|
I am not sure to understand this. In the doc "LinearSVC" estimator is used, which does not throw any error. I just tried the same piece of code with TSNE estimator and noticed the error. Where should I replace TSNE with another estimator? I also noticed that in earlier versions of sklearn (before the implementation of the |
Ah ignore me I was hasty and falsely thought that Also, the current failing CI is unrelated to this PR |
|
Got it! |
|
Hey there @chalulu, could you merge w/ main and push to prompt the CI/CD once more? I think the current error is not related to your PR. |
|
@Micky774 I merged with main and pushed again. |
Reference Issues/PRs
Updated TSNE to use parameter constraints as part of #23462.
What does this implement/fix? Explain your changes.
Any other comments?