Aesara is a Python library that allows one to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.

BlackJAX is a sampling library designed for ease of use, speed and modularity.

Hy on Adderall - a miniKanren implementation in Hy

Hidden Markov models in PyMC3

An experimental HMC implementation in Aesara

Hy on monaxhyd, a monad library for Hy

brandonwillard/brandonwillard.github.io 2

A website!

Hy on Adderall - a miniKanren implementation in Hy

An experimental HMC implementation in Aesara

Tools for a[e] PPL in Aesara.

push eventbrandonwillard/staged-recipes

commit sha 034824a850a47be1feaa15e21cfb3cee2453e94c

Create a new recipe for AeHMC

push time in 10 hours

push eventbrandonwillard/spacemacs-custom

commit sha 2ac85994a7c6c34520cd174532fdf9ad66f784e7

Use new pytest-btw package

commit sha 21b0ca8614b1e2dd11ad376defb90b6b2b0cc700

Fix recent comint blocking issues when running pytest with pdb

commit sha 7dfe08f1d3d44cd7165db605618d504713fcf1c0

Make *all* comint output read-only

push time in 18 hours

Pull request review commentconda-forge/staged-recipes

+{% set version = "0.0.2" %}++package:+ name: aehmc+ version: {{ version }}++source:+ url: https://pypi.io/packages/source/a/aehmc/aehmc-{{ version }}.tar.gz+ sha256: 1e3e648198baf4c610c09f77d91a3affbdb83cb1f212a6c327885cf4300b2ae2+ patches:++build:+ number: 0+ script: {{ PYTHON }} -m pip install . -vv+ noarch: python++requirements:+ host:+ - pip+ - python >=3.6+ - setuptools+ run:+ - python >=3.6+ - numpy >=1.18.1+ - scipy >=1.4.0+ - aesara >=2.1.1+ - aeppl >=0.0.5++test:+ imports:+ - aehmc

Good point; @rlouf, which modules should we import?

comment created time in 21 hours

push eventaesara-devs/aehmc

commit sha 0d1d7c1bbc08c1ca1fe2d8ea53c47f2d8e276660

Build the NUTS kernel with a logprob function

push time in a day

PR merged aesara-devs/aehmc

We currently need to provide a potential function to build the NUTS kernel. However, end users are used to working with logprobs and not potentials so this might be confusing. We thus now require a logpropb function to build the NUTS kernel (it is already the case for the HMC kernel).

Closes #30

pr closed time in a day

issue closedaesara-devs/aehmc

`nuts.kernel` should take a `logprob_fn` as an argument

Like `hmc.kernel`

does. It currently takes a potential function.

closed time in a day

rloufpush eventbrandonwillard/staged-recipes

commit sha c1aee461b63bf07769efc962992347d5b4f365a8

Create a new recipe for AeHMC

push time in a day

issue commentaesara-devs/aehmc

This was merged, closing.

We're still waiting for the conda-forge folks to merge https://github.com/conda-forge/staged-recipes/pull/15767.

comment created time in a day

pull request commentaesara-devs/aehmc

Add logistic regression example with NUTS

Do we need to add an application to the `aesara-devs`

org or something?

comment created time in a day

delete branch brandonwillard/aesara

delete branch : fix-indices_from_subtensor-typing

delete time in a day

push eventaesara-devs/aesara

commit sha 62d2c048ac86d4b3e4a4480f72aa95f0af58548a

Fix docstring and type hints for indices_from_subtensor

push time in a day

PR merged aesara-devs/aesara

This PR fixes some docstring and type hinting issues in `indices_from_subtensor`

.

pr closed time in a day

pull request commentaesara-devs/aeppl

Add support for `Scan` `Op`s in `joint_logprob`

I just added a commit that handles the first remaining issue (i.e. the section in https://github.com/aesara-devs/aeppl/pull/24#issuecomment-922369850 titled "Add MeasurableVariable detection for Subtensor Scan output")

comment created time in 2 days

push eventkc611/aeppl

commit sha 4d27b626dc86c5ee119c33308ef76154f2494605

Handle value mappings for Scans with taps and initial values

push time in 2 days

PR opened aesara-devs/aesara

This PR fixes some docstring and type hinting issues in `indices_from_subtensor`

.

pr created time in 2 days

create barnchbrandonwillard/aesara

branch : fix-indices_from_subtensor-typing

created branch time in 2 days

push eventbrandonwillard/python-btw

commit sha a3a4c2c12f74ade49fe0c0d163b4ea010b936e08

Remove comint read-only hooks

push time in 2 days

push eventbrandonwillard/spacemacs

commit sha f5bd49cc8e99ec5ec63f3581200c350d55a20c5b

Revise some smaller layers

push time in 2 days

issue openedAmpersandTV/pymc3-hmm

Use `datashader` for time-series distribution plots

The following seems to demonstrate how we can use `datashader`

to produce distribution plots rather quickly for large series:

```
import pickle
import datashader as ds
import datashader.transfer_functions as tf
import matplotlib.pyplot as plt
# Load posterior predictive estimates for a simulated series
with open("sample_pp_trace.pkl", "rb") as f:
pp_trace = pickle.load(f)
pp_trace.observed_data
# <xarray.Dataset>
# Dimensions: (dt: 8784)
# Coordinates:
# * dt (dt) datetime64[ns] 2020-02-11T01:00:00 ... 2021-02-11
# Data variables:
# Y_t (dt) int64 1955927 1870384 1793920 ... 1940015 1790022 1737292
# Attributes:
# created_at: 2021-09-21T20:21:14.864357
# arviz_version: 0.11.2
# inference_library: pymc3
# inference_library_version: 3.11.2
pp_trace.posterior_predictive
# <xarray.Dataset>
# Dimensions: (beta_dim_0: 2016, chain: 1, draw: 100, dt: 8784, xi_0_dim_0: 2016, xi_1_dim_0: 2016)
# Coordinates:
# * chain (chain) int64 0
# * draw (draw) int64 0 1 2 3 4 5 6 7 8 9 ... 91 92 93 94 95 96 97 98 99
# * dt (dt) datetime64[ns] 2020-02-11T01:00:00 ... 2021-02-11
# * beta_dim_0 (beta_dim_0) int64 0 1 2 3 4 5 ... 2010 2011 2012 2013 2014 2015
# * xi_0_dim_0 (xi_0_dim_0) int64 0 1 2 3 4 5 ... 2010 2011 2012 2013 2014 2015
# * xi_1_dim_0 (xi_1_dim_0) int64 0 1 2 3 4 5 ... 2010 2011 2012 2013 2014 2015
# Data variables:
# S_t (chain, draw, dt) int64 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1
# beta (chain, draw, beta_dim_0) float64 -0.3512 0.75 ... -0.2256
# xi_0 (chain, draw, xi_0_dim_0) float64 0.0004301 ... -0.0001103
# xi_1 (chain, draw, xi_1_dim_0) float64 -40.1 -4.832 ... 3.142 3.291
# mu (chain, draw, dt) float64 1.888e+06 1.862e+06 ... 1.477e+06
# Y_t (chain, draw, dt) float64 1.979e+06 1.799e+06 ... 1.491e+06
# Attributes:
# created_at: 2021-09-21T20:21:14.861233
# arviz_version: 0.11.2
# inference_library: pymc3
# inference_library_version: 3.11.2
df = pp_trace.posterior_predictive.Y_t[0].drop("chain").to_dataframe()
df = df.reset_index()
df.dt = df.dt.astype(int)
N_obs = pp_trace.posterior_predictive.dt.data.shape[0]
canvas = ds.Canvas(
plot_width=N_obs,
plot_height=300,
# x_range=(ds_df.dt.min(), ds_df.dt.max()),
y_range=(0.0, df["Y_t"].max()),
x_axis_type="linear",
y_axis_type="linear",
)
agg = canvas.points(df, "dt", "Y_t")
agg.coords.update({"dt": pp_trace.posterior_predictive.dt.data})
shade_res = tf.shade(agg, cmap="black", how="eq_hist")
res_img = tf.Image(shade_res)
plt.close()
fig, ax = plt.subplots(figsize=(10, 5))
qmesh = res_img.plot(cmap="Blues", ax=ax, label="posterior predictives")
ax.step(
pp_trace.observed_data.dt.data,
pp_trace.observed_data.Y_t.data,
color="black",
label="obs",
alpha=0.7,
linewidth=1.3,
)
# XXX: Don't use `ax.legend`; it might freeze the plot!
fig.legend()
```

The whole picture won't look good for some obvious reasons, but, after zooming in, the results look similar to the ones we're producing (albeit with much more effort and less scalability):

After zooming:

Let's try to improve these results and replace our current time-series histogram approach with this one.

created time in 2 days

push eventAmpersandTV/pymc3-hmm

commit sha 5b82ec0bbbf3b0255e65e11b6970fbac1d278bd9

Remove conditioning in distribution_subset_args

commit sha 2e3104a7242f5bcba4d3a64483c4903e0c6dce5c

Return distribution_subset_args dict instead of list

push time in 2 days

PR merged AmpersandTV/pymc3-hmm

This PR removes the `point`

argument and related conditioning logic from `distribution_subset_args`

to avoid the potential name conflicts described in #91.

Closes #91.

pr closed time in 2 days

issue closedAmpersandTV/pymc3-hmm

Incorrect conditioning in `SwitchingProcess.random`

In `SwitchingProcess.random`

, there are two places where `point`

is used to condition variables: `distribution_subset_args`

and the component distribution's `random`

method. `distribution_subset_args`

substitutes values by matching the component distribution's formal parameter names to the keys of `point`

, while the component distribution's `random`

method tries to match on user-defined distribution and variable names. This can lead to confusion and / or incorrect conditioning when the formal parameter names and user-defined names are the same.

There is already a test where this issue can be demonstrated:

https://github.com/AmpersandTV/pymc3-hmm/blob/26f7009ab3e87570f0a56948a23b1f8d00bb22ed/tests/test_distributions.py#L428-L439

In the above, the `Constant`

distribution used for the Poisson mean is given the user-defined name `"c"`

. However, the `Constant`

distribution's formal parameter name is also `c`

:

https://github.com/AmpersandTV/pymc3-hmm/blob/26f7009ab3e87570f0a56948a23b1f8d00bb22ed/pymc3_hmm/distributions.py#L441-L450

So in the above test, conditioning on the point `{"c": 100.0}`

causes the Poisson mean *and* the value for the `Constant`

component distribution (i.e. the zero state of the mixture) to be set to 100. That is, the below assertion:

```
assert np.all(test_sample[..., test_states == 0] == 0)
```

will fail.

closed time in 2 days

jeffreyenospush eventjeffreyenos/pymc3-hmm

commit sha 2fa247c0177ee5c4c8d3b0ad76ac10711940c05f

Remove conditioning in distribution_subset_args

commit sha b5463d244e4b6f5f86fb14fb6f6cf47458509bc7

Return distribution_subset_args dict instead of list

push time in 2 days

push eventjeffreyenos/pymc3-hmm

commit sha 5dc2e953f19cbe3fda4a08a798b6c64e24ab2fe1

Remove conditioning in distribution_subset_args

commit sha 7232045ae6a8ccfb0cc014550060c0f80a2ffc50

Return distribution_subset_args dict instead of list

push time in 2 days