Skip to content

[MRG] Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV #8847

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

Conversation

manrajgrover
Copy link
Contributor

Fixes min_samples_split values for RandomizedSearchCV and GridSearchCV in the example used in documentation.

Reference Issue

None

What does this implement/fix? Explain your changes.

Fixes ValueError: min_samples_split must be at least 2 or in (0, 1], got 1 error in examples/model_selection/randomized_search.py

Any other comments?

None

@jnothman
Copy link
Member

jnothman commented May 8, 2017 via email

@manrajgrover manrajgrover changed the title [MRG] Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV [WIP] Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV May 9, 2017
@lesteve
Copy link
Member

lesteve commented May 9, 2017

and we should have a CI test for non-plotted examples or convert as many as possible to plots

At one point @ogrisel suggested that we should have a convention like run_ for examples that we want to run during the documentation but that do not produce any plot. sphinx-gallery allows to use a regex for examples that you want to run so it could be run_|plot_.

I quickly looked at it at the time and there are at least a few of the 17 non plot_ examples and some that do not take that long to run. Some may take a long time and whether it is feasible to run them during CI is up for debate.

I'll open a separate issue about this.

@manrajgrover
Copy link
Contributor Author

@jnothman Made the required change. 😄 I have a question though. If error says (0, 1], why does it fail on 1 when it should not and not on 1.0 to maintain consistency? Is it a bug (and known)? Yes, we should definitely build all examples.

@lesteve That's great! I can help fixing that. 😄

@manrajgrover manrajgrover changed the title [WIP] Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV [MRG] Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV May 9, 2017
@jnothman
Copy link
Member

jnothman commented May 9, 2017 via email

@jnothman
Copy link
Member

jnothman commented May 9, 2017

Thanks

@jnothman jnothman merged commit 6d604d1 into scikit-learn:master May 9, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
…domizedSearchCV and GridSearchCV (scikit-learn#8847)

* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV

* Randomized Search Example: Change min_samples_split from 1.0 -> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants