@@ -940,7 +940,7 @@ def _set_up_for_fit(self, y: np.ndarray) -> None:
940
940
elif (self .lower_bounds is None ) and (self .upper_bounds is None ):
941
941
if np .all (np .asarray (self .l1_ratio ) == 0 ):
942
942
self ._solver = "irls-ls"
943
- elif getattr (self , "alpha" , 1 ) == 0 and not self .alpha_search :
943
+ elif getattr (self , "alpha" , 0 ) == 0 and not self .alpha_search :
944
944
self ._solver = "irls-ls"
945
945
else :
946
946
self ._solver = "irls-cd"
@@ -2304,8 +2304,7 @@ def covariance_matrix(
2304
2304
_expected_information = expected_information
2305
2305
2306
2306
if (
2307
- (hasattr (self , "alpha" ) and self .alpha is None )
2308
- or (
2307
+ (
2309
2308
hasattr (self , "alpha" )
2310
2309
and isinstance (self .alpha , (int , float ))
2311
2310
and self .alpha > 0
@@ -2914,11 +2913,11 @@ class GeneralizedLinearRegressor(GeneralizedLinearRegressorBase):
2914
2913
alpha : {float, array-like}, optional (default=None)
2915
2914
Constant that multiplies the penalty terms and thus determines the
2916
2915
regularization strength. If ``alpha_search`` is ``False`` (the default),
2917
- then ``alpha`` must be a scalar or None (equivalent to ``alpha=1. 0``).
2916
+ then ``alpha`` must be a scalar or None (equivalent to ``alpha=0``).
2918
2917
If ``alpha_search`` is ``True``, then ``alpha`` must be an iterable or
2919
2918
``None``. See ``alpha_search`` to find how the regularization path is
2920
2919
set if ``alpha`` is ``None``. See the notes for the exact mathematical
2921
- meaning of this parameter. ``alpha = 0`` is equivalent to unpenalized
2920
+ meaning of this parameter. ``alpha= 0`` is equivalent to unpenalized
2922
2921
GLMs. In this case, the design matrix ``X`` must have full column rank
2923
2922
(no collinearities).
2924
2923
@@ -3146,10 +3145,11 @@ class GeneralizedLinearRegressor(GeneralizedLinearRegressorBase):
3146
3145
3147
3146
drop_first : bool, optional (default = False)
3148
3147
If ``True``, drop the first column when encoding categorical variables.
3149
- Set this to True when alpha=0 and solver='auto' to prevent an error due to a
3150
- singular feature matrix. In the case of using a formula with interactions,
3151
- setting this argument to ``True`` ensures structural full-rankness (it is
3152
- equivalent to ``ensure_full_rank`` in formulaic and tabmat).
3148
+ Set this to True when ``alpha=0`` and ``solver='auto'`` to prevent an error
3149
+ due to a singular feature matrix. In the case of using a formula with
3150
+ interactions, setting this argument to ``True`` ensures structural
3151
+ full-rankness (it is equivalent to ``ensure_full_rank`` in formulaic and
3152
+ tabmat).
3153
3153
3154
3154
robust : bool, optional (default = False)
3155
3155
If true, then robust standard errors are computed by default.
@@ -3573,7 +3573,7 @@ def fit(
3573
3573
self .coef_ = self .coef_path_ [- 1 ]
3574
3574
else :
3575
3575
if self .alpha is None :
3576
- _alpha = 1 .0
3576
+ _alpha = 0 .0
3577
3577
else :
3578
3578
_alpha = self .alpha
3579
3579
if _alpha > 0 and self .l1_ratio > 0 and self ._solver != "irls-cd" :
0 commit comments