Use random state to initialize MLPClassifier.#12892
Use random state to initialize MLPClassifier.#12892qinhanmin2014 merged 11 commits intoscikit-learn:masterfrom
Conversation
jnothman
left a comment
There was a problem hiding this comment.
We still ordinarily use a fixed random_state in tests
| with ignore_warnings(category=ConvergenceWarning): | ||
| clf.fit(X, y) | ||
| clf = MLPClassifier(hidden_layer_sizes=5, activation='logistic' | ||
| random_stat=1) |
There was a problem hiding this comment.
There is a typo in random_state and a comma missing before this parameter.
|
Please merge updated master to avoid the circle ci failure. Let us know if you need help with that. Thanks |
|
Hmm, I'm still getting ConvergenceWarning? System: BLAS: Python deps: |
|
I think it's reasonable to keep the ConvergenceWarning, will mere when green. |
|
thanks @xhan7279 |
|
thanks everyone for helping me out =) |
Reference Issues/PRs
Fixes #12762
What does this implement/fix? Explain your changes.
The test failed if the random seed is changed. Initialize MLP Classifier with a random state seems to resolve the issue.
Any other comments?