8000 DOC included default values in DictionaryLearning class (#15435) · rasbt/scikit-learn@8bf1814 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8bf1814

Browse files
cgsavardrth
authored andcommitted
DOC included default values in DictionaryLearning class (scikit-learn#15435)
1 parent 82e2f54 commit 8bf1814

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

sklearn/decomposition/_dict_learning.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,19 +1061,19 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
10611061
10621062
Parameters
10631063
----------
1064-
n_components : int,
1064+
n_components : int, default=n_features
10651065
number of dictionary elements to extract
10661066
1067-
alpha : float,
1067+
alpha : float, default=1.0
10681068
sparsity controlling parameter
10691069
1070-
max_iter : int,
1070+
max_iter : int, default=1000
10711071
maximum number of iterations to perform
10721072
1073-
tol : float,
1073+
tol : float, default=1e-8
10741074
tolerance for numerical error
10751075
1076-
fit_algorithm : {'lars', 'cd'}
1076+
fit_algorithm : {'lars', 'cd'}, default='lars'
10771077
lars: uses the least angle regression method to solve the lasso problem
10781078
(linear_model.lars_path)
10791079
cd: uses the coordinate descent method to compute the
@@ -1084,7 +1084,7 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
10841084
*cd* coordinate descent method to improve speed.
10851085
10861086
transform_algorithm : {'lasso_lars', 'lasso_cd', 'lars', 'omp', \
1087-
'threshold'}
1087+
'threshold'}, default='omp'
10881088
Algorithm used to transform the data
10891089
lars: uses the least angle regression method (linear_model.lars_path)
10901090
lasso_lars: uses Lars to compute the Lasso solution
@@ -1098,12 +1098,12 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
10981098
.. versionadded:: 0.17
10991099
*lasso_cd* coordinate descent method to improve speed.
11001100
1101-
transform_n_nonzero_coefs : int, ``0.1 * n_features`` by default
1101+
transform_n_nonzero_coefs : int, default=0.1*n_features
11021102
Number of nonzero coefficients to target in each column of the
11031103
solution. This is only used by `algorithm='lars'` and `algorithm='omp'`
11041104
and is overridden by `alpha` in the `omp` case.
11051105
1106-
transform_alpha : float, 1. by default
1106+
transform_alpha : float, default=1.0
11071107
If `algorithm='lasso_lars'` or `algorithm='lasso_cd'`, `alpha` is the
11081108
penalty applied to the L1 norm.
11091109
If `algorithm='threshold'`, `alpha` is the absolute value of the
@@ -1112,43 +1112,43 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
11121112
the reconstruction error targeted. In this case, it overrides
11131113
`n_nonzero_coefs`.
11141114
1115-
n_jobs : int or None, optional (default=None)
1115+
n_jobs : int or None, default=None
11161116
Number of parallel jobs to run.
11171117
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
11181118
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
11191119
for more details.
11201120
1121-
code_init : array of shape (n_samples, n_components),
1121+
code_init : array of shape (n_samples, n_components), default=None
11221122
initial value for the code, for warm restart
11231123
1124-
dict_init : array of shape (n_components, n_features),
1124+
dict_init : array of shape (n_components, n_features), default=None
11251125
initial values for the dictionary, for warm restart
11261126
1127-
verbose : bool, optional (default: False)
1127+
verbose : bool, default=False
11281128
To control the verbosity of the procedure.
11291129
1130-
split_sign : bool, False by default
1130+
split_sign : bool, default=False
11311131
Whether to split the sparse feature vector into the concatenation of
11321132
its negative part and its positive part. This can improve the
11331133
performance of downstream classifiers.
11341134
1135-
random_state : int, RandomState instance or None, optional (default=None)
1135+
random_state : int, RandomState instance or None, default=None
11361136
If int, random_state is the seed used by the random number generator;
11371137
If RandomState instance, random_state is the random number generator;
11381138
If None, the random number generator is the RandomState instance used
11391139
by `np.random`.
11401140
1141-
positive_code : bool
1141+
positive_code : bool, default=False
11421142
Whether to enforce positivity when finding the code.
11431143
11441144
.. versionadded:: 0.20
11451145
1146-
positive_dict : bool
1146+
positive_dict : bool, default=False
11471147
Whether to enforce positivity when finding the dictionary
11481148
11491149
.. versionadded:: 0.20
11501150
1151-
transform_max_iter : int, optional (default=1000)
1151+
transform_max_iter : int, default=1000
11521152
Maximum number of iterations to perform if `algorithm='lasso_cd'` or
11531153
`lasso_lars`.
11541154

0 commit comments

Comments
 (0)
0