Skip to content
Merged
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
23 changes: 13 additions & 10 deletions sklearn/datasets/twenty_newsgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may not need these newlines in between these items.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remove it.

- 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)
Expand Down Expand Up @@ -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

Expand Down