|
39 | 39 | logger = logging.getLogger()
|
40 | 40 |
|
41 | 41 |
|
42 |
| -def fetch_kddcup99(subset=None, shuffle=False, random_state=None, |
| 42 | +def fetch_kddcup99(subset=None, data_home=None, shuffle=False, |
| 43 | + random_state=None, |
43 | 44 | percent10=True, download_if_missing=True):
|
44 | 45 | """Load and return the kddcup 99 dataset (classification).
|
45 | 46 |
|
@@ -124,6 +125,11 @@ def fetch_kddcup99(subset=None, shuffle=False, random_state=None,
|
124 | 125 | To return the corresponding classical subsets of kddcup 99.
|
125 | 126 | If None, return the entire kddcup 99 dataset.
|
126 | 127 |
|
| 128 | + data_home : string, optional |
| 129 | + Specify another download and cache folder for the datasets. By default |
| 130 | + all scikit-learn data is stored in '~/scikit_learn_data' subfolders. |
| 131 | + .. versionadded:: 0.19 |
| 132 | +
|
127 | 133 | random_state : int, RandomState instance or None, optional (default=None)
|
128 | 134 | Random state for shuffling the dataset.
|
129 | 135 | If int, random_state is the seed used by the random number generator;
|
@@ -162,7 +168,9 @@ def fetch_kddcup99(subset=None, shuffle=False, random_state=None,
|
162 | 168 | and data mining, pages 320-324. ACM Press, 2000.
|
163 | 169 |
|
164 | 170 | """
|
165 |
| - kddcup99 = _fetch_brute_kddcup99(shuffle=shuffle, percent10=percent10, |
| 171 | + data_home = get_data_home(data_home=data_home) |
| 172 | + kddcup99 = _fetch_brute_kddcup99(data_home=data_home, shuffle=shuffle, |
| 173 | + percent10=percent10, |
166 | 174 | download_if_missing=download_if_missing)
|
167 | 175 |
|
168 | 176 | data = kddcup99.data
|
|
0 commit comments