dswah / pyGAM

[HELP REQUESTED] Generalized Additive Models in Python
https://pygam.readthedocs.io
Apache License 2.0
857 stars 157 forks source link

How to replicate `by` keyword in mgcv smooth term #289

Open heathwinning-sunshot opened 3 years ago

heathwinning-sunshot commented 3 years ago

Is it possible to replicate the functionality of the by keyword of the mgcv smooth term? I am particularly interested in using by with a factor variable, as in the example

gam(y ~ fac+s(x2,by=fac)+s(x0),data=dat)

taken from mgcv examples