Skip to content

Commit 8eef0e7

Browse files
authored
DOC Add links to text/plot_hashing_vs_dict_vectorizer.py example (scikit-learn#26967)
1 parent 8ccaf0d commit 8eef0e7

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

sklearn/feature_extraction/_dict_vectorizer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class DictVectorizer(TransformerMixin, BaseEstimator):
4242
Features that do not occur in a sample (mapping) will have a zero value
4343
in the resulting array/matrix.
4444
45+
For an efficiency comparision of the different feature extractors, see
46+
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.
47+
4548
Read more in the :ref:`User Guide <dict_feature_extraction>`.
4649
4750
Parameters

sklearn/feature_extraction/_hash.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ class FeatureHasher(TransformerMixin, BaseEstimator):
3434
where memory is tight, e.g. when running prediction code on embedded
3535
devices.
3636
37+
For an efficiency comparision of the different feature extractors, see
38+
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.
39+
3740
Read more in the :ref:`User Guide <feature_hashing>`.
3841
3942
.. versionadded:: 0.13

sklearn/feature_extraction/text.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,9 @@ class HashingVectorizer(
602602
603603
The hash function employed is the signed 32-bit version of Murmurhash3.
604604
605+
For an efficiency comparision of the different feature extractors, see
606+
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.
607+
605608
Read more in the :ref:`User Guide <text_feature_extraction>`.
606609
607610
Parameters
@@ -933,6 +936,9 @@ class CountVectorizer(_VectorizerMixin, BaseEstimator):
933936
that does some kind of feature selection then the number of features will
934937
be equal to the vocabulary size found by analyzing the data.
935938
939+
For an efficiency comparision of the different feature extractors, see
940+
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.
941+
936942
Read more in the :ref:`User Guide <text_feature_extraction>`.
937943
938944
Parameters
@@ -1758,6 +1764,9 @@ class TfidfVectorizer(CountVectorizer):
17581764
For an example of usage, see
17591765
:ref:`sphx_glr_auto_examples_text_plot_document_classification_20newsgroups.py`.
17601766
1767+
For an efficiency comparision of the different feature extractors, see
1768+
:ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`.
1769+
17611770
Read more in the :ref:`User Guide <text_feature_extraction>`.
17621771
17631772
Parameters

0 commit comments

Comments
 (0)