diff --git a/sklearn/datasets/_species_distributions.py b/sklearn/datasets/_species_distributions.py index 091708e6f8ee4..2aa7caab403c8 100644 --- a/sklearn/datasets/_species_distributions.py +++ b/sklearn/datasets/_species_distributions.py @@ -51,6 +51,7 @@ from ._base import RemoteFileMetadata from ..utils import Bunch from ._base import _pkl_filepath +from ..utils._param_validation import validate_params # The original data can be found at: # https://biodiversityinformatics.amnh.org/open_source/maxent/samples.zip @@ -137,6 +138,7 @@ def construct_grids(batch): return (xgrid, ygrid) +@validate_params({"data_home": [str, None], "download_if_missing": ["boolean"]}) def fetch_species_distributions(*, data_home=None, download_if_missing=True): """Loader for species distribution dataset from Phillips et. al. (2006). diff --git a/sklearn/tests/test_public_functions.py b/sklearn/tests/test_public_functions.py index 1f3966890344e..0266de650b41e 100644 --- a/sklearn/tests/test_public_functions.py +++ b/sklearn/tests/test_public_functions.py @@ -128,6 +128,7 @@ def _check_function_param_validation( "sklearn.datasets.fetch_lfw_people", "sklearn.datasets.fetch_olivetti_faces", "sklearn.datasets.fetch_rcv1", + "sklearn.datasets.fetch_species_distributions", "sklearn.datasets.load_breast_cancer", "sklearn.datasets.load_diabetes", "sklearn.datasets.load_iris",