DOC: Document how to call `DifferentialEquation` in a model (`y0`, `theta`, output shape)
Maintainers usually reply within 3 days
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
The issue names the DifferentialEquation docstring in pymc/ode/ode.py; start by reading that docstring and the existing example. Add the proposed explanations for y0, theta, and output shape. Done means the docstring explains the call arguments and both output shapes.
Written by the indexing model from the issue text.
Description
Page: pymc.ode.DifferentialEquation
Problem
The docs describe the DifferentialEquation constructor, but not how to call the object it returns inside a PyMC model. That call takes two arguments, y0 (the initial state) and theta (the parameters), and neither is explained. The example on the page stops at constructing ode_model.
The docs also don't say what shape the output has. The docs for scipy.integrate.odeint, the function this class calls internally, state the output shape in their Returns section, and something similar here would help.
Proposed addition
After the parameter list, or as an extension of the existing example:
Calling the object returned by
DifferentialEquationtakes two arguments:
y0: the initial state, one value per state variable.theta: the parameter vector, in the orderfuncexpects.The output has shape
(number of time points, number of states): one row per entry intimesand one column per state. When sampled values are stored, the chain and draw axes come first, so a stored result has shape(chain, draw, time points, states).
I haven't included a reproducible example since this is a documentation proposal, not a bug, but I can supply one if it's useful. The change would be to the DifferentialEquation docstring in pymc/ode/ode.py, and I'm happy to open a PR if it's wanted.
- Dominant language
- Python
- Stars
- 9.9k
- Forks
- 2.4k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pymc-devs/pymc
-
BUG: ZarrTrace fails in init_trace for models with datetime coordinates (object dtype coord array)Possibly taken @vladosskins178 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 3 days
-
BUG: DEMetropolis/DEMetropolisZ crash when vars is a subset of the model variablesPossibly taken @Souravrajvi0 claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 3 days
-
BUG: logp of pt.max/pt.min over a multi-dimensional i.i.d. variable has shape x.shape[1:] instead of being a scalarPossibly taken @saifmodan2006 claimed this 11 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pymc-devs/pymc#8635 · 2 comments ·
Maintainers usually reply within 3 days
-
ENH: permit cachetools >= 7May be free again @shupandee claimed this 9 days ago, and no pull request is open. Openfeature request
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pymc-devs/pymc#8633 · 1 comment ·
Maintainers usually reply within 3 days
-
Model.table(): Allow truncating of parameter list in distributionsPossibly taken @Imad2702 claimed this 17 days ago. Openbeginner friendly
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
pymc-devs/pymc#8609 · 1 comment ·
Maintainers usually reply within 3 days
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meetecho/juturna_nodes#43 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TigreGotico/text2spoken#726 ·
Maintainers usually reply within 1 day
-
bug dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
nolte/claude-shared#822 ·
Maintainers usually reply within 1 day
-
`RequestHandler.build_request_kwargs` drops empty request bodies such as `{}` or `""`Possibly taken @abhirajadhikary06 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
typesense/typesense-python#170 ·
Maintainers usually reply within 1 day
-
claude-subscription-directsdk: tool calls with raw control characters in string values are droppedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NousResearch/hermes-official-plugins#538 ·
Maintainers usually reply within 3 days