Settle on the API for hierarchical models
See original GitHub issue# 1) class option
model = LinearTrend() + FourierSeasonality()
model = HierarchicalLinearTrend(group='subject') + FourierSeasonality()
model = GroupedLinearTrend(group='subject') + FourierSeasonality()
# 2) metaclass option
model = LinearTrend() + FourierSeasonality()
model = Hierarchical(LinearTrend(), on='subject') + FourierSeasonality()
model = Distinct(LinearTrend(), on='subject') + FourierSeasonality()
# 3) seperate hierarchy object 1
partial_subject = Share(type='partially_shared', on='subject')
distinct_subject = Share(type='distinct', on='subject')
model = LinearTrend() + FourierSeasonality()
model = LinearTrend().share(partial_subject) + FourierSeasonality()
model = LinearTrend().share(distinct_subject) + FourierSeasonality()
# 4) seperate hierarchy object 2
shared_subject = Share(type='shared') # default
partial_subject = Share(type='partially_shared', on='subject')
distinct_subject = Share(type='distinct', on='subject')
model = LinearTrend(share=shared_subject) + FourierSeasonality(share=shared_subject)
model = LinearTrend(share=partial_subject) + FourierSeasonality()
model = LinearTrend(share=distinct_subject) + FourierSeasonality()
# 5) keyword option
model = LinearTrend(shared='full') + FourierSeasonality() # shared='full' is default
model = LinearTrend(group='subject', shared='partial') + FourierSeasonality()
model = LinearTrend(group='subject', shared='none') + FourierSeasonality()
# Cannibalism in this option
model = Constant(range=(0, None), shared='none') + LinearTrend(shared='full') + ((FourierSeasonality(perios=365) + FourierSeasonality(period=7)) * Constant(range=[-1, 1], group='subject', shared='none'))
model = LinearTrend() + (FourierSeasonality(perios=365) * Constant(range=[-1, 1], group='subject', shared='none')) + FourierSeasonality(period=7)
# 6) keyword option
model = LinearTrend() + FourierSeasonality()
model = LinearTrend(partially_shared_on='subject') + FourierSeasonality()
model = LinearTrend(distinct_on='subject') + FourierSeasonality()
# 7) bitwise or Operator option
model = LinearTrend() # single estimation for all subjects
model = (LinearTrend() | 'subject') + FourierSeasonality() # hierarchical estimation
model = (LinearTrend() || ('subject') + FourierSeasonality() # independent estimation
#return day well spent
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Finally! Bayesian Hierarchical Modelling at Scale
In this blog post, I want to draw your attention to the somewhat dusty Bayesian Hierarchical Modelling. Modern techniques and frameworks ...
Read more >Why hierarchical models are awesome, tricky, and Bayesian
Hierarchical models are underappreciated. Hierarchies exist in many data sets and modeling them appropriately adds a boat load of statistical ...
Read more >Hierarchical modelling in Python with statsmodels
I have a dataset with random effects at different hierarchies and now I want to analyze how they influence my target variable. Somehow...
Read more >Using Bayesian Hierarchical Models in PyMC3 to Infer the ...
In this post, we look at how to use PyMC3 to infer the disease parameters for COVID-19. PyMC3 is a popular probabilistic programming ......
Read more >Reduce forecasting bias with hierarchical aggregation | Vertex ...
For detailed instructions on how to configure hierarchical forecasting when training your forecasting model using the API, see Train a forecast model.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I agree that that probably shouldn’t be allowed. I wonder if it’s even worth setting this on the entire model, I expect in most cases that you shrink on some parameters but not on others.
True and that’s indeed one of the major pros of option 4. That said though, you can also get that behaviour with
**kwargslike this:What do you mean with the combination with switchpoints? Variance is a good point. didn’t really think about how that fits in the API yet at all.
What does it mean if pooling is
partial,completeorNone?