-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AR1 time series distribution [WIP] #5388
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report
@@ Coverage Diff @@
## main #5388 +/- ##
==========================================
- Coverage 80.44% 80.43% -0.02%
==========================================
Files 82 82
Lines 14132 14150 +18
==========================================
+ Hits 11369 11381 +12
- Misses 2763 2769 +6
|
@@ -0,0 +1,249 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ricardoV94 any chance this error happens because I use a for loop in the logp instead of scan
Reply via ReviewNB
@@ -32,49 +37,94 @@ | |||
"MvStudentTRandomWalk", | |||
] | |||
|
|||
class AR1rv(RandomVariable): | |||
name = "AR1" | |||
ndim_supp = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ndim_supp = 0 | |
ndim_supp = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i saw this comment on grw pr as well and for some reason ndim_supp = 1 throws an error when i add observed, something like "dimension mismatch of 2 and 1" as in data is 1d or something, i dont know why does it happen though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's related to the comments below, you haven't yet told Aesara how to infer the shape of the distribution given the parameters (and size). It tries to do something by default, but usually fails with multivariate distributions where there is not a simple 1-1 map between parameter shapes and distribution shape
@mjhajharia I would suggest you try to run the default pymc/pymc/tests/test_distributions_random.py Lines 1179 to 1196 in 71b18e6
You need to tell Aesara how to infer the shape of the distribution given the parameters, and those checks cover that |
Actually the recent StickBreakingWeights distribution is a very good template in general for this type of multivariate distributions: pymc/pymc/distributions/multivariate.py Line 2194 in 71b18e6
Edit: For the shape inference look here: pymc/pymc/distributions/multivariate.py Lines 2214 to 2219 in 71b18e6
|
Just a heads up. I havent forgotten about this. I know youre busy with Data Umbrella and also I still dont exactly know what im doing with new distributions. Once both of those challenges are over in the near future I'll revisit this |
closes #5291