ENH/TST: GAM model with terms with different spline bases
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Read the GenericSmoother and AdditiveSmoother code in statsmodels/gam/smooth_basis.py, then inspect the GenericSmoother example in statsmodels/gam/tests/test_gam.py. Determine how separate univariate smoothers could support different spline bases and a simpler API. Done means GAM can combine those terms with a test covering the mixed-basis case.
Written by the indexing model from the issue text.
Description
this came up in a mailing list discussion
https://groups.google.com/d/msg/pystatsmodels/8exUYkwiky0/Jof0JpJJCwAJ
quoted:
BTW the GLMGam(smoother=) takes a single smoother instance rather than an array - is it possible to use say a BSpline for x0 and PeriodicSpline for x1?
Theoretically yes, but I think I never tried that, so there are likely some problems.
The generic multiple spline class should take a list of individual, univariate splines
possibly GenericSmoothers(AdditiveGamSmoother)
https://github.com/statsmodels/statsmodels/blob/master/statsmodels/gam/smooth_basis.py#L797
but that would require construction of the univariate smoothers by the user, see the specific BSpline and Cyclic spline smoother classes.
enhancement issue for this would be useful. This needs a simpler API.
The AdditiveSmoother class is just holding the list of all individual, univariate smoothers and delegating to those, AFAIR.
There is one basic unit test example with GenericSmoother
https://github.com/statsmodels/statsmodels/blob/master/statsmodels/gam/tests/test_gam.py#L291
- Dominant language
- Python
- Stars
- 11.6k
- Forks
- 3.6k
- Avg merge
- 7h 37m
- Merged PRs (30d)
- 96
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from statsmodels/statsmodels
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
statsmodels/statsmodels#10271 ·
-
type-bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
statsmodels/statsmodels#10269 ·
-
Documentation
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
statsmodels/statsmodels#10266 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
statsmodels/statsmodels#9627 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
statsmodels/statsmodels#9293 · 1 comment ·
All issues in statsmodels/statsmodels
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100