Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d7aa066

Browse filesBrowse files
Théophile BarangerItay
Théophile Baranger
authored and
Itay
committed
MAINT Parameters validation for datasets.make_s_curve (scikit-learn#26022)
1 parent 75316ba commit d7aa066
Copy full SHA for d7aa066

File tree

Expand file treeCollapse file tree

2 files changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-0
lines changed

‎sklearn/datasets/_samples_generator.py

Copy file name to clipboardExpand all lines: sklearn/datasets/_samples_generator.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,6 +1700,13 @@ def make_swiss_roll(n_samples=100, *, noise=0.0, random_state=None, hole=False):
17001700
return X, t
17011701

17021702

1703+
@validate_params(
1704+
{
1705+
"n_samples": [Interval(Integral, 1, None, closed="left")],
1706+
"noise": [Interval(Real, 0, None, closed="left")],
1707+
"random_state": ["random_state"],
1708+
}
1709+
)
17031710
def make_s_curve(n_samples=100, *, noise=0.0, random_state=None):
17041711
"""Generate an S curve dataset.
17051712

‎sklearn/tests/test_public_functions.py

Copy file name to clipboardExpand all lines: sklearn/tests/test_public_functions.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def _check_function_param_validation(
142142
"sklearn.datasets.make_moons",
143143
"sklearn.datasets.make_multilabel_classification",
144144
"sklearn.datasets.make_regression",
145+
"sklearn.datasets.make_s_curve",
145146
"sklearn.datasets.make_sparse_coded_signal",
146147
"sklearn.datasets.make_sparse_spd_matrix",
147148
"sklearn.datasets.make_sparse_uncorrelated",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.