Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Mixture distribution for V4 #5438

Merged
merged 13 commits into from
Mar 9, 2022
Merged
1 change: 1 addition & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
pymc/tests/test_transforms.py
pymc/tests/test_smc.py
pymc/tests/test_bart.py
pymc/tests/test_mixture.py

- |
pymc/tests/test_parallel_sampling.py
Expand Down
3 changes: 2 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Instead update the vNext section until 4.0.0 is out.
### Not-yet working features
We plan to get these working again, but at this point their inner workings have not been refactored.
- Timeseries distributions (see [#4642](https://github.com/pymc-devs/pymc/issues/4642))
- Mixture distributions (see [#4781](https://github.com/pymc-devs/pymc/issues/4781))
- Nested Mixture distributions (see [#5533](https://github.com/pymc-devs/pymc/issues/5533))
- Elliptical slice sampling (see [#5137](https://github.com/pymc-devs/pymc/issues/5137))
- `BaseStochasticGradient` (see [#5138](https://github.com/pymc-devs/pymc/issues/5138))
- `pm.sample_posterior_predictive_w` (see [#4807](https://github.com/pymc-devs/pymc/issues/4807))
Expand Down Expand Up @@ -72,6 +72,7 @@ All of the above apply to:
- In the gp.utils file, the `kmeans_inducing_points` function now passes through `kmeans_kwargs` to scipy's k-means function.
- The function `replace_with_values` function has been added to `gp.utils`.
- `MarginalSparse` has been renamed `MarginalApprox`.
- Removed `MixtureSameFamily`. `Mixture` is now capable of handling batched multivariate components (see [#5438](https://github.com/pymc-devs/pymc/pull/5438)).
- ...

### Expected breaks
Expand Down
1 change: 0 additions & 1 deletion docs/source/api/distributions/mixture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ Mixture

Mixture
NormalMixture
MixtureSameFamily
3 changes: 1 addition & 2 deletions pymc/distributions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
NoDistribution,
SymbolicDistribution,
)
from pymc.distributions.mixture import Mixture, MixtureSameFamily, NormalMixture
from pymc.distributions.mixture import Mixture, NormalMixture
from pymc.distributions.multivariate import (
CAR,
Dirichlet,
Expand Down Expand Up @@ -180,7 +180,6 @@
"SkewNormal",
"Mixture",
"NormalMixture",
"MixtureSameFamily",
"Triangular",
"DiscreteWeibull",
"Gumbel",
Expand Down
1 change: 1 addition & 0 deletions pymc/distributions/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ def __new__(
rv_out = cls.change_size(
rv=rv_out,
new_size=resize_shape,
expand=True,
)

rv_out = model.register_rv(
Expand Down
Loading