@@ -1061,19 +1061,19 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
1061
1061
1062
1062
Parameters
1063
1063
----------
1064
- n_components : int,
1064
+ n_components : int, default=n_features
1065
1065
number of dictionary elements to extract
1066
1066
1067
- alpha : float,
1067
+ alpha : float, default=1.0
1068
1068
sparsity controlling parameter
1069
1069
1070
- max_iter : int,
1070
+ max_iter : int, default=1000
1071
1071
maximum number of iterations to perform
1072
1072
1073
- tol : float,
1073
+ tol : float, default=1e-8
1074
1074
tolerance for numerical error
1075
1075
1076
- fit_algorithm : {'lars', 'cd'}
1076
+ fit_algorithm : {'lars', 'cd'}, default='lars'
1077
1077
lars: uses the least angle regression method to solve the lasso problem
1078
1078
(linear_model.lars_path)
1079
1079
cd: uses the coordinate descent method to compute the
@@ -1084,7 +1084,7 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
1084
1084
*cd* coordinate descent method to improve speed.
1085
1085
1086
1086
transform_algorithm : {'lasso_lars', 'lasso_cd', 'lars', 'omp', \
1087
- 'threshold'}
1087
+ 'threshold'}, default='omp'
1088
1088
Algorithm used to transform the data
1089
1089
lars: uses the least angle regression method (linear_model.lars_path)
1090
1090
lasso_lars: uses Lars to compute the Lasso solution
@@ -1098,12 +1098,12 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
1098
1098
.. versionadded:: 0.17
1099
1099
*lasso_cd* coordinate descent method to improve speed.
1100
1100
1101
- transform_n_nonzero_coefs : int, `` 0.1 * n_features`` by default
1101
+ transform_n_nonzero_coefs : int, default= 0.1* n_features
1102
1102
Number of nonzero coefficients to target in each column of the
1103
1103
solution. This is only used by `algorithm='lars'` and `algorithm='omp'`
1104
1104
and is overridden by `alpha` in the `omp` case.
1105
1105
1106
- transform_alpha : float, 1. by default
1106
+ transform_alpha : float, default=1.0
1107
1107
If `algorithm='lasso_lars'` or `algorithm='lasso_cd'`, `alpha` is the
1108
1108
penalty applied to the L1 norm.
1109
1109
If `algorithm='threshold'`, `alpha` is the absolute value of the
@@ -1112,43 +1112,43 @@ class DictionaryLearning(SparseCodingMixin, BaseEstimator):
1112
1112
the reconstruction error targeted. In this case, it overrides
1113
1113
`n_nonzero_coefs`.
1114
1114
1115
- n_jobs : int or None, optional ( default=None)
1115
+ n_jobs : int or None, default=None
1116
1116
Number of parallel jobs to run.
1117
1117
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
1118
1118
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
1119
1119
for more details.
1120
1120
1121
- code_init : array of shape (n_samples, n_components),
1121
+ code_init : array of shape (n_samples, n_components), default=None
1122
1122
initial value for the code, for warm restart
1123
1123
1124
- dict_init : array of shape (n_components, n_features),
1124
+ dict_init : array of shape (n_components, n_features), default=None
1125
1125
initial values for the dictionary, for warm restart
1126
1126
1127
- verbose : bool, optional ( default: False)
1127
+ verbose : bool, default= False
1128
1128
To control the verbosity of the procedure.
1129
1129
1130
- split_sign : bool, False by default
1130
+ split_sign : bool, default=False
1131
1131
Whether to split the sparse feature vector into the concatenation of
1132
1132
its negative part and its positive part. This can improve the
1133
1133
performance of downstream classifiers.
1134
1134
1135
- random_state : int, RandomState instance or None, optional ( default=None)
1135
+ random_state : int, RandomState instance or None, default=None
1136
1136
If int, random_state is the seed used by the random number generator;
1137
1137
If RandomState instance, random_state is the random number generator;
1138
1138
If None, the random number generator is the RandomState instance used
1139
1139
by `np.random`.
1140
1140
1141
- positive_code : bool
1141
+ positive_code : bool, default=False
1142
1142
Whether to enforce positivity when finding the code.
1143
1143
1144
1144
.. versionadded:: 0.20
1145
1145
1146
- positive_dict : bool
1146
+ positive_dict : bool, default=False
1147
1147
Whether to enforce positivity when finding the dictionary
1148
1148
1149
1149
.. versionadded:: 0.20
1150
1150
1151
- transform_max_iter : int, optional ( default=1000)
1151
+ transform_max_iter : int, default=1000
1152
1152
Maximum number of iterations to perform if `algorithm='lasso_cd'` or
1153
1153
`lasso_lars`.
1154
1154
0 commit comments