1

Should I standardize my features before or after applying Splines?

More specifically, I am running the following code to transform my features:

transformed_x = dmatrix("bs(Data, df=6, degree=3, include_intercept=False)-1",
                                 {"Data":Data}, return_type='dataframe')

which results in a cubic spline. Then I estimate my betas using something like:

GroupLassoRegressor(group_ids=Group_ids, alpha=0.5).fit(transformed_x, y_train)

My question is not so much about the implementation, but rather whether I should standardize my features (remove mean and scale to unit variance) before transforming them?

John
  • 555
  • 3
  • 16

0 Answers0