Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions sklearn/datasets/_kddcup99.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from . import get_data_home
from ._base import RemoteFileMetadata
from ._base import load_descr
from ..utils._param_validation import StrOptions, validate_params
from ..utils import Bunch
from ..utils import check_random_state
from ..utils import shuffle as shuffle_method
Expand All @@ -46,6 +47,18 @@
logger = logging.getLogger(__name__)


@validate_params(
{
"subset": [StrOptions({"SA", "SF", "http", "smtp"}), None],
"data_home": [str, None],
"shuffle": ["boolean"],
"random_state": ["random_state"],
"percent10": ["boolean"],
"download_if_missing": ["boolean"],
"return_X_y": ["boolean"],
"as_frame": ["boolean"],
}
)
def fetch_kddcup99(
*,
subset=None,
Expand Down
1 change: 1 addition & 0 deletions sklearn/tests/test_public_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def _check_function_param_validation(
"sklearn.covariance.empirical_covariance",
"sklearn.covariance.shrunk_covariance",
"sklearn.datasets.fetch_california_housing",
"sklearn.datasets.fetch_kddcup99",
"sklearn.datasets.make_classification",
"sklearn.datasets.make_sparse_coded_signal",
"sklearn.decomposition.sparse_encode",
Expand Down