[FR] Render models to a LaTex formula
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 27
Description
Similar to render_model but render to a LaTex formula. Example:
def model(data):
m = pyro.sample("m", dist.Normal(0, 1))
sd = pyro.sample("sd", dist.LogNormal(m, 1))
with pyro.plate("N", len(data)):
pyro.sample("obs", dist.Normal(m, sd), obs=data)
render_to_latex_formula(model, model_args=(data,))
Possible outputs:
- Specify the factorization of the log-joint: $p(m) p(sd \mid m) \prod_{N} p(obs=data \mid m, sd)$
- Specify distribution names too: $\mathrm{Normal}(m) \mathrm{LogNormal}(sd \mid m) \prod_{N} \mathrm{Normal}(obs=data \mid m, sd)$
Contributor 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.
Research direction
Locate the existing render_model entry point and inspect how it represents a model. Resolve whether the factorized or distribution-named LaTeX output is required, then define and test render_to_latex_formula against the example model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100