Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies the
AR
distribution to accommodate cross-series coefficients as desired in a vector autoregressive model. More information can be found at https://discourse.pymc.io/t/how-to-implement-vector-autoregression-with-interdependencies/4287/2 and #4665. This is marked as a WIP as I would like some advice on how to handle theconstant
argument for theAR
distribution.what are the (breaking) changes that this PR makes?
Depending on the dimensions of
rho
, thelogp
function will either use an elementwise operation or a matrix multiplication for the independent and dependent time series cases, respectively. However, models which assume 2 or more dimensions indexing independent time series will no longer behave the same. In this case, the recommended approach is to reshape these two dimensions into a single one so that arho
tensor with shape[lags, d, d]
can be interpreted as using multipled
xd
cross-series coefficients.important background, or details about the implementation
There is a
constant
argument for theAR
distribution which I am unable to decipher and have not been able to address the case in whichconstant
is used.are the changes—especially new features—covered by tests and docstrings?
No new tests or doc modifications have been added yet.
linting/style checks have been run
consider adding/updating relevant example notebooks
right before it's ready to merge, mention the PR in the RELEASE-NOTES.md