From 88c4588cec18ee97a507e07a1329680c979cdaf1 Mon Sep 17 00:00:00 2001 From: Iglesys Date: Mon, 20 Jun 2022 13:11:10 +0200 Subject: [PATCH 1/4] DOC Fix scipy broken link --- doc/modules/grid_search.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/grid_search.rst b/doc/modules/grid_search.rst index 280117c23d853..f19ca56f69b0d 100644 --- a/doc/modules/grid_search.rst +++ b/doc/modules/grid_search.rst @@ -153,7 +153,7 @@ A continuous log-uniform random variable is available through log-spaced parameters. For example to specify ``C`` above, ``loguniform(1, 100)`` can be used instead of ``[1, 10, 100]`` or ``np.logspace(0, 2, num=1000)``. This is an alias to SciPy's `stats.reciprocal -`_. +`_. Mirroring the example above in grid search, we can specify a continuous random variable that is log-uniformly distributed between ``1e0`` and ``1e3``:: From ebcc66c114f0958f10bace59e198db7922587e61 Mon Sep 17 00:00:00 2001 From: Iglesys Date: Mon, 20 Jun 2022 17:55:08 +0200 Subject: [PATCH 2/4] Changed link to https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.loguniform.html --- doc/modules/grid_search.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/modules/grid_search.rst b/doc/modules/grid_search.rst index f19ca56f69b0d..547f5dc3f98be 100644 --- a/doc/modules/grid_search.rst +++ b/doc/modules/grid_search.rst @@ -152,8 +152,8 @@ A continuous log-uniform random variable is available through :class:`~sklearn.utils.fixes.loguniform`. This is a continuous version of log-spaced parameters. For example to specify ``C`` above, ``loguniform(1, 100)`` can be used instead of ``[1, 10, 100]`` or ``np.logspace(0, 2, -num=1000)``. This is an alias to SciPy's `stats.reciprocal -`_. +num=1000)``. This is an alias to SciPy's `stats.loguniform +`_. Mirroring the example above in grid search, we can specify a continuous random variable that is log-uniformly distributed between ``1e0`` and ``1e3``:: From 4c3d190b02948b1e2804d2a9486b02de16f3b936 Mon Sep 17 00:00:00 2001 From: Iglesys Date: Mon, 20 Jun 2022 18:06:50 +0200 Subject: [PATCH 3/4] Add some comment about reciprocal --- doc/modules/grid_search.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/modules/grid_search.rst b/doc/modules/grid_search.rst index 547f5dc3f98be..9c46815415250 100644 --- a/doc/modules/grid_search.rst +++ b/doc/modules/grid_search.rst @@ -153,7 +153,8 @@ A continuous log-uniform random variable is available through log-spaced parameters. For example to specify ``C`` above, ``loguniform(1, 100)`` can be used instead of ``[1, 10, 100]`` or ``np.logspace(0, 2, num=1000)``. This is an alias to SciPy's `stats.loguniform -`_. +`_ +(note that the ``loguniform`` is an alias to ``reciprocal`` for SciPy < 1.4). Mirroring the example above in grid search, we can specify a continuous random variable that is log-uniformly distributed between ``1e0`` and ``1e3``:: From a522b42e5f328a26ad0adbcbbad93464b597a763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 21 Jun 2022 11:03:50 +0200 Subject: [PATCH 4/4] tweak --- doc/modules/grid_search.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/modules/grid_search.rst b/doc/modules/grid_search.rst index 9c46815415250..ad3f24f23980a 100644 --- a/doc/modules/grid_search.rst +++ b/doc/modules/grid_search.rst @@ -152,9 +152,8 @@ A continuous log-uniform random variable is available through :class:`~sklearn.utils.fixes.loguniform`. This is a continuous version of log-spaced parameters. For example to specify ``C`` above, ``loguniform(1, 100)`` can be used instead of ``[1, 10, 100]`` or ``np.logspace(0, 2, -num=1000)``. This is an alias to SciPy's `stats.loguniform -`_ -(note that the ``loguniform`` is an alias to ``reciprocal`` for SciPy < 1.4). +num=1000)``. This is an alias to `scipy.stats.loguniform +`_. Mirroring the example above in grid search, we can specify a continuous random variable that is log-uniformly distributed between ``1e0`` and ``1e3``::