@@ -1181,19 +1181,8 @@ def _transform(self, X, dictionary):
1181
1181
SparseCoder."""
1182
1182
X = self ._validate_data (X , reset = False )
1183
1183
1184
- # transform_alpha has to be changed in _transform
1185
- # this is done for consistency with the value of alpha
1186
- if (
1187
- hasattr (self , "alpha" )
1188
- and self .alpha != 1.0
1189
- and self .transform_alpha is None
1190
- ):
1191
- warnings .warn (
1192
- "By default transform_alpha will be equal to"
1193
- "alpha instead of 1.0 starting from version 1.2" ,
1194
- FutureWarning ,
1195
- )
1196
- transform_alpha = 1.0 # TODO change to self.alpha in 1.2
1184
+ if hasattr (self , "alpha" ) and self .transform_alpha is None :
1185
+ transform_alpha = self .alpha
1197
1186
else :
1198
1187
transform_alpha = self .transform_alpha
1199
1188
@@ -1523,6 +1512,9 @@ class DictionaryLearning(_BaseSparseCoding, BaseEstimator):
1523
1512
threshold below which coefficients will be squashed to zero.
1524
1513
If `None`, defaults to `alpha`.
1525
1514
1515
+ .. versionchanged:: 1.2
1516
+ When None, default value changed from 1.0 to `alpha`.
1517
+
1526
1518
n_jobs : int or None, default=None
1527
1519
Number of parallel jobs to run.
1528
1520
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
@@ -1848,6 +1840,9 @@ class MiniBatchDictionaryLearning(_BaseSparseCoding, BaseEstimator):
1848
1840
threshold below which coefficients will be squashed to zero.
1849
1841
If `None`, defaults to `alpha`.
1850
1842
1843
+ .. versionchanged:: 1.2
1844
+ When None, default value changed from 1.0 to `alpha`.
1845
+
1851
1846
verbose : bool or int, default=False
1852
1847
To control the verbosity of the procedure.
1853
1848
0 commit comments