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 56c4255

Browse filesBrowse files
author
Théophile Baranger
authored
MAINT Parameters validation for datasets.make_checkerboard (#25955)
1 parent f659ea4 commit 56c4255
Copy full SHA for 56c4255

File tree

2 files changed

+14
-2
lines changed
Filter options

2 files changed

+14
-2
lines changed

‎sklearn/datasets/_samples_generator.py

Copy file name to clipboardExpand all lines: sklearn/datasets/_samples_generator.py
+13-2Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,17 @@ def make_biclusters(
18991899
return result, rows, cols
19001900

19011901

1902+
@validate_params(
1903+
{
1904+
"shape": [tuple],
1905+
"n_clusters": [Interval(Integral, 1, None, closed="left"), "array-like"],
1906+
"noise": [Interval(Real, 0, None, closed="left")],
1907+
"minval": [Interval(Real, None, None, closed="neither")],
1908+
"maxval": [Interval(Real, None, None, closed="neither")],
1909+
"shuffle": ["boolean"],
1910+
"random_state": ["random_state"],
1911+
}
1912+
)
19021913
def make_checkerboard(
19031914
shape,
19041915
n_clusters,
@@ -1924,10 +1935,10 @@ def make_checkerboard(
19241935
noise : float, default=0.0
19251936
The standard deviation of the gaussian noise.
19261937
1927-
minval : int, default=10
1938+
minval : float, default=10
19281939
Minimum value of a bicluster.
19291940
1930-
maxval : int, default=100
1941+
maxval : float, default=100
19311942
Maximum value of a bicluster.
19321943
19331944
shuffle : bool, default=True

‎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
@@ -129,6 +129,7 @@ def _check_function_param_validation(
129129
"sklearn.datasets.fetch_olivetti_faces",
130130
"sklearn.datasets.load_svmlight_file",
131131
"sklearn.datasets.load_svmlight_files",
132+
"sklearn.datasets.make_checkerboard",
132133
"sklearn.datasets.make_circles",
133134
"sklearn.datasets.make_classification",
134135
"sklearn.datasets.make_friedman1",

0 commit comments

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