pzivich / Delicatessen

Delicatessen: the Python one-stop sandwich (variance) shop 🥪
https://deli.readthedocs.io/en/latest/index.html
MIT License
22 stars 2 forks source link

Rescale generated spline terms #33

Closed pzivich closed 6 months ago

pzivich commented 8 months ago

Is your feature request related to a problem? Please describe. I should add normalized splines. Essentially, I should divided by (knots[-1] - knots[0]) ** term to rescale the terms. This will make some of the background model estimating easier (less extreme covariate values).

The normalized splines would be an option to preserve historical behavior. In a 3.0 release, I would like to have the rescaled splines be the default option. This would be in a major release, since it changes the default behavior.

Describe the solution you'd like Add normed argument to splines. It would ad (knots[-1] - knots[0]) ** term as a divisor to each spline term.

Describe alternatives you've considered Rescaling covariates prior to using the M-estimator. A bit annoying and I can simplify with this trick.

Additional context None