Thanks to visit codestin.com
Credit goes to github.com

Skip to content

improve TfidfVectorizer documentation #12811

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

Closed
wants to merge 12 commits into from
Closed
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
13 changes: 13 additions & 0 deletions sklearn/decomposition/dict_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,19 @@ def dict_learning_online(X, n_components=2, alpha=1, n_iter=100,
Number of iterations run. Returned only if `return_n_iter` is
set to `True`.

Examples
--------
>>> import numpy as np
>>> from sklearn.decomposition import DictionaryLearning
>>> X = np.array([[0., 0., 1.],
... [1., 0., 0.],
... [2., 2., 2.],
... [2., 5., 4.]])
>>> dico = DictionaryLearning(n_components=2, alpha=1, random_state=1)
>>> dico.fit(X).components_ # doctest: +ELLIPSIS
array([[-0.2981..., -0.7453..., -0.5962...],
[ 0.5773..., 0.5773..., 0.5773...]])

See also
--------
dict_learning
Expand Down