Created
January 30, 2019 00:50
-
-
Save josef-pkt/29ad2116e9af0864e5100ded89efe1f5 to your computer and use it in GitHub Desktop.
Basic GAM example with formula after merge
The docstring says list of dict
, because splines could have several variables and we need several splines. Try brackets [ ]
around the dict.
You can inspect the bsplines instance to see how the knots where set.
Note: in Bsplines
everything is in list of splines, e.g. from above bs = BSplines(x_spline, df=[12, 10], degree=[3, 3])
AFAICS, [s.knots for s in bs.smoothers]
should show the knots for each univariate bspline.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, thanks for this valuable resource on how to use GAM in Python. I would like to know how I should specify knot locations.
I tried bs.knot_kwds={'knots':(num1,num2)}
It runs without error. But, is this the correct way?