https://github.com/aesara-devs/aehmc

An HMC/NUTS implementation in Aesara

https://github.com/aesara-devs/aehmc

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary

Keywords

hmc mcmc nuts symbolic-computation

Keywords from Contributors

optimizing-compiler probabilistic-programming
Last synced: 9 months ago · JSON representation

Repository

An HMC/NUTS implementation in Aesara

Basic Info
  • Host: GitHub
  • Owner: aesara-devs
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 1.83 MB
Statistics
  • Stars: 31
  • Watchers: 5
  • Forks: 6
  • Open Issues: 7
  • Releases: 11
Topics
hmc mcmc nuts symbolic-computation
Created about 5 years ago · Last pushed almost 3 years ago
Metadata Files
Readme Funding License Security

README.md

# Aehmc [![Pypi][pypi-badge]][pypi] [![Gitter][gitter-badge]][gitter] [![Discord][discord-badge]][discord] [![Twitter][twitter-badge]][twitter] AeHMC provides implementations for the HMC and NUTS samplers in [Aesara](https://github.com/aesara-devs/aesara). [Features](#features) • [Get Started](#get-started) • [Install](#install) • [Get help](#get-help) • [Contribute](#contribute)

Get started

``` python import aesara from aesara import tensor as at from aesara.tensor.random.utils import RandomStream

from aeppl import joint_logprob

from aehmc import nuts

A simple normal distribution

Y_rv = at.random.normal(0, 1)

def logprobfn(y): return jointlogprob(realized={Y_rv: y})[0]

Build the transition kernel

srng = RandomStream(seed=0) kernel = nuts.newkernel(srng, logprobfn)

Compile a function that updates the chain

yvv = Yrv.clone() initialstate = nuts.newstate(yvv, logprobfn)

stepsize = at.astensor(1e-2) inversemassmatrix=at.astensor(1.0) chaininfo, updates = kernel(initialstate, stepsize, inversemassmatrix)

nextstepfn = aesara.function([yvv], chaininfo.state.position, updates=updates)

print(nextstepfn(0))

1.1034719409361107

```

Install

The latest release of AeHMC can be installed from PyPI using pip:

bash pip install aehmc

Or via conda-forge:

bash conda install -c conda-forge aehmc

The current development branch of AeHMC can be installed from GitHub using pip:

bash pip install git+https://github.com/aesara-devs/aehmc

Get help

Report bugs by opening an issue. If you have a question regarding the usage of AeHMC, start a discussion. For real-time feedback or more general chat about AeHMC use our Discord server or Gitter room.

Contribute

AeHMC welcomes contributions. A good place to start contributing is by looking at the issues.

If you want to implement a new feature, open a discussion or come chat with us on Discord or Gitter.

Owner

  • Name: Aesara
  • Login: aesara-devs
  • Kind: organization
  • Email: aesara.devs@gmail.com

GitHub Events

Total
Last Year

Committers

Last synced: about 3 years ago

All Time
  • Total Commits: 132
  • Total Committers: 5
  • Avg Commits per committer: 26.4
  • Development Distribution Score (DDS): 0.303
Past Year
  • Commits: 47
  • Committers: 3
  • Avg Commits per committer: 15.667
  • Development Distribution Score (DDS): 0.383
Top Committers
Name Email Commits
Rémi Louf r****f@g****m 92
Brandon T. Willard b****d@u****m 36
Rémi Louf r****i@t****m 2
Brandon T. Willard 9****d@u****m 1
Thomas Wiecki t****i@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 41
  • Total pull requests: 56
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 12 days
  • Total issue authors: 4
  • Total pull request authors: 5
  • Average comments per issue: 1.12
  • Average comments per pull request: 3.14
  • Merged pull requests: 49
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rlouf (21)
  • zoj613 (9)
  • brandonwillard (9)
  • twiecki (2)
Pull Request Authors
  • rlouf (38)
  • brandonwillard (12)
  • zoj613 (4)
  • gitter-badger (1)
  • twiecki (1)
Top Labels
Issue Labels
enhancement (17) important (15) help wanted (11) good first issue (7) bug (7) testing (5) documentation (5) refactoring (4) CI (2) jax (1) numba (1) question (1)
Pull Request Labels
important (19) enhancement (19) bug (11) refactoring (8) documentation (6) testing (4) CI (3) numba (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 71 last-month
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 21
  • Total maintainers: 3
pypi.org: aehmc

HMC samplers in Aesara

  • Versions: 11
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 54 Last month
Rankings
Dependent packages count: 4.6%
Stargazers count: 11.3%
Forks count: 13.3%
Average: 14.0%
Downloads: 19.0%
Dependent repos count: 21.8%
Maintainers (3)
Last synced: 10 months ago
pypi.org: aehmc-nightly

HMC samplers in Aesara

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 17 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 11.4%
Forks count: 14.5%
Average: 23.4%
Dependent repos count: 30.6%
Downloads: 53.9%
Maintainers (3)
Last synced: 10 months ago
conda-forge.org: aehmc
  • Versions: 9
  • Dependent Packages: 1
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.4%
Dependent packages count: 29.0%
Average: 37.7%
Stargazers count: 45.1%
Forks count: 52.3%
Last synced: 10 months ago

Dependencies

.github/workflows/pypi.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v2 composite
  • codecov/codecov-action v1 composite
  • conda-incubator/setup-miniconda v2 composite
  • dorny/paths-filter v2 composite
  • pre-commit/action v2.0.0 composite
examples/requirements.txt pypi
  • aeppl *
  • matplotlib *
  • pymc3 *
requirements.txt pypi
  • arviz *
  • autoflake *
  • black ==20.8b1
  • coveralls *
  • diff-cover *
  • pre-commit *
  • pydocstyle >=3.0.0
  • pylint >=2.3.1
  • pytest >=5.0.0
  • pytest-cov >=2.6.1
  • pytest-html >=1.20.0
  • versioneer *
environment.yml pypi
pyproject.toml pypi
  • aeppl >= 0.1.4
  • aesara >= 2.8.11
  • numpy >= 1.18.1
  • scipy >= 1.4.0