pymc-devs / pymc-devs/pymc-examples

Error in Forecasting_with_structural_timeseries (too many indices for array)

Open
#532 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
398
Forks
325
Avg merge
9d 15m
Merged PRs (30d)
1

Description

Forecasting with Structural AR Timeseries

Issue description

Executing step by step each cell I got: too many indices for array at line:

IndexError                                Traceback (most recent call last)
<ipython-input-13-fc80453dcf5f> in <module>
     15         sigma=sigma,
     16         constant=True,
---> 17         dims="obs_id_fut_1",
     18     )
     19     yhat_fut = pm.Normal("yhat_fut", mu=ar1_fut[1:], sigma=sigma, dims="obs_id_fut")

Note: I'm not sure if the bug is related to pymc it self or the example, I can't find a way to verify that.

Expected output (according to the doc)

Sampling: [ar1_fut, likelihood, yhat_fut]

 100.00% [8000/8000 00:31<00:00]

Additional info:

Execution environment:

  • python v3.7
  • Miniconda + custom pip packages
  • BeakerX (jupyter notebook).

Proposed solution

Probably reducing dimension.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked Forecasting with Structural AR Timeseries notebook and reproduce the failing cell at the dims="obs_id_fut_1" line. Compare the notebook's behavior with the reported Python 3.7 and BeakerX environment to determine whether the problem is in the example or PyMC. Done means the documented sampling output is produced or the compatibility issue is clearly identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.