DOC Document that fetch_20newsgroups also returns target_names
@@ -216,11 +216,13 @@ def fetch_20newsgroups(data_home=None, subset='train', categories=None,
Returns
-------
- bunch : Bunch object
- bunch.data: list, length [n_samples]
- bunch.target: array, shape [n_samples]
- bunch.filenames: list, length [n_classes]
- bunch.DESCR: a description of the dataset.
+ bunch : Bunch object with the following attribute:
+ - bunch.data: list, length [n_samples]
+ - bunch.target: array, shape [n_samples]
+ - bunch.filenames: list, length [n_samples]
+ - bunch.DESCR: a description of the dataset.
+ - bunch.target_names: a list of categories of the returned data,
+ length [n_classes]. This depends on the `categories` parameter.
"""
data_home = get_data_home(data_home=data_home)
@@ -369,11 +371,12 @@ def fetch_20newsgroups_vectorized(subset="train", remove=(), data_home=None,
Returns
-------
- bunch : Bunch object
- bunch.data: sparse matrix, shape [n_samples, n_features]
- bunch.target: array, shape [n_samples]
- bunch.target_names: list, length [n_classes]
- bunch.DESCR: a description of the dataset.
+ bunch : Bunch object with the following attribute:
+ - bunch.data: sparse matrix, shape [n_samples, n_features]
+ - bunch.target: array, shape [n_samples]
+ - bunch.target_names: a list of categories of the returned data,
+ length [n_classes].
+ - bunch.DESCR: a description of the dataset.
(data, target) : tuple if ``return_X_y`` is True
