Skip to content

DOC Add links to text/plot_hashing_vs_dict_vectorizer.py example #26967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
3 changes: 3 additions & 0 deletions sklearn/feature_extraction/_dict_vectorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class DictVectorizer(TransformerMixin, BaseEstimator):
Features that do not occur in a sample (mapping) will have a zero value
in the resulting array/matrix.

For an efficiency comparision of the different feature extractors, see
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.

Read more in the :ref:`User Guide <dict_feature_extraction>`.

Parameters
Expand Down
3 changes: 3 additions & 0 deletions sklearn/feature_extraction/_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class FeatureHasher(TransformerMixin, BaseEstimator):
where memory is tight, e.g. when running prediction code on embedded
devices.

For an efficiency comparision of the different feature extractors, see
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.

Read more in the :ref:`User Guide <feature_hashing>`.

.. versionadded:: 0.13
Expand Down
9 changes: 9 additions & 0 deletions sklearn/feature_extraction/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,9 @@ class HashingVectorizer(

The hash function employed is the signed 32-bit version of Murmurhash3.

For an efficiency comparision of the different feature extractors, see
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.

Read more in the :ref:`User Guide <text_feature_extraction>`.

Parameters
Expand Down Expand Up @@ -933,6 +936,9 @@ class CountVectorizer(_VectorizerMixin, BaseEstimator):
that does some kind of feature selection then the number of features will
be equal to the vocabulary size found by analyzing the data.

For an efficiency comparision of the different feature extractors, see
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.

Read more in the :ref:`User Guide <text_feature_extraction>`.

Parameters
Expand Down Expand Up @@ -1758,6 +1764,9 @@ class TfidfVectorizer(CountVectorizer):
For an example of usage, see
:ref:`sphx_glr_auto_examples_text_plot_document_classification_20newsgroups.py`.

For an efficiency comparision of the different feature extractors, see
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.

Read more in the :ref:`User Guide <text_feature_extraction>`.

Parameters
Expand Down