pymc-devs / pymc-devs/pymc-examples

Errors in GP-circular notebook

Open
#790 0 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

Notebook Title: GP-Circular
Notebook URL: URL

Issue description

The notebook is broken, possibly due to new version of PyMC.
I advise to follow the link for the source code. Running the last command

 plot_kernel_results(circular)

gives error on command

trace = pm.sample_posterior_predictive([mp], var_names=["y"], samples=100)

saying that keyword 'samples' is unknown.

This keyword is also absent in official docs right now,
but is present in previous tutorials, say in year 2022 (it is actually a pain that it was changed and
who the hell knows how to set number of samples).

I have tried to just remove this keyword (assuming that some default number of samples will be
generated) - but then next command fails

    paths = plt.polar(angles, trace["y"].T, color="b", alpha=0.05)

with error that 'trace' has no key 'y'.

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

Start with examples/gaussian_processes/GP-Circular.ipynb and run plot_kernel_results(circular) to reproduce the failure. Inspect the pm.sample_posterior_predictive call and the subsequent trace["y"] access; done means the notebook runs through the polar plot without the reported keyword or missing-key errors.

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
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.