Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scikit-learn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ian Johnson
scikit-learn
Commits
9784dfd6
Commit
9784dfd6
authored
13 years ago
by
Mathieu Blondel
Browse files
Options
Downloads
Patches
Plain Diff
Address @ogrisel and @amueller's comments.
parent
0b0d8d14
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/datasets/twenty_newsgroups.rst
+3
-0
3 additions, 0 deletions
doc/datasets/twenty_newsgroups.rst
sklearn/datasets/twenty_newsgroups.py
+2
-1
2 additions, 1 deletion
sklearn/datasets/twenty_newsgroups.py
with
5 additions
and
1 deletion
doc/datasets/twenty_newsgroups.rst
+
3
−
0
View file @
9784dfd6
...
...
@@ -99,6 +99,9 @@ zero features)::
>>> vectors.nnz / vectors.shape[0]
118
``sklearn.datasets.fetch_20newsgroups_tfidf`` is a function which returns
ready-to-use tfidf features instead of file names.
.. _`20 newsgroups website`: http://people.csail.mit.edu/jrennie/20Newsgroups/
.. _`TF-IDF`: http://en.wikipedia.org/wiki/Tf-idf
...
...
This diff is collapsed.
Click to expand it.
sklearn/datasets/twenty_newsgroups.py
+
2
−
1
View file @
9784dfd6
...
...
@@ -97,7 +97,7 @@ def download_20newsgroups(target_dir, cache_path):
def
fetch_20newsgroups
(
data_home
=
None
,
subset
=
'
train
'
,
categories
=
None
,
shuffle
=
True
,
random_state
=
42
,
download_if_missing
=
True
):
"""
Load the filenames of the 20 newsgroups dataset
"""
Load the filenames of the 20 newsgroups dataset
.
Parameters
----------
...
...
@@ -225,6 +225,7 @@ def fetch_20newsgroups_tfidf(subset="train", data_home=None):
data_home
=
get_data_home
(
data_home
=
data_home
)
mem
=
Memory
(
cachedir
=
data_home
,
verbose
=
False
)
# we shuffle but use a fixed seed for the memoization
data_train
=
fetch_20newsgroups
(
data_home
=
data_home
,
subset
=
'
train
'
,
categories
=
None
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment