glum/scale-predictors-without-intercept
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| glum | error | none, edit by hand | All versions |
GeneralizedLinearRegressor and GeneralizedLinearRegressorCV raise ValueError("scale_predictors=True is not supported when fit_intercept=False.") during fit because internal standardization centers predictors around the intercept.
glm = GeneralizedLinearRegressor(scale_predictors=True, fit_intercept=False)glm = GeneralizedLinearRegressor(scale_predictors=True, fit_intercept=True)What the rule reports
Section titled “What the rule reports”Calls to GeneralizedLinearRegressor or GeneralizedLinearRegressorCV combining scale_predictors=True with fit_intercept=False.
How to fix it
Section titled “How to fix it”Keep fit_intercept=True when enabling scale_predictors=True, or disable scale_predictors and scale predictors explicitly before fitting.
Diagnostic message
Section titled “Diagnostic message”scale_predictors=True is not supported when fit_intercept=False and raises ValueError in glum. Set fit_intercept=True or scale_predictors=False.See all rules in the glum pack.