Skip to content

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)

Calls to GeneralizedLinearRegressor or GeneralizedLinearRegressorCV combining scale_predictors=True with fit_intercept=False.

Keep fit_intercept=True when enabling scale_predictors=True, or disable scale_predictors and scale predictors explicitly before fitting.

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.