Skip to content

Commit 2dda3b0

Browse files
committed
update release notes, remove vi hdi report
1 parent 78b6f79 commit 2dda3b0

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

RELEASE-NOTES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
### New features
1515
- `sample_posterior_predictive_w` can now feed on `xarray.Dataset` - e.g. from `InferenceData.posterior`. (see [#4042](https://github.com/pymc-devs/pymc3/pull/4042))
1616
- Add MLDA, a new stepper for multilevel sampling. MLDA can be used when a hierarchy of approximate posteriors of varying accuracy is available, offering improved sampling efficiency especially in high-dimensional problems and/or where gradients are not available (see [#3926](https://github.com/pymc-devs/pymc3/pull/3926))
17-
- Change SMC metropolis kernel to independent metropolis kernel [#4115](https://github.com/pymc-devs/pymc3/pull/3926))
17+
- Change SMC metropolis kernel to independent metropolis kernel [#4115](https://github.com/pymc-devs/pymc3/pull/4115))
1818
- Add alternative parametrization to NegativeBinomial distribution in terms of n and p (see [#4126](https://github.com/pymc-devs/pymc3/issues/4126))
19+
- Add Bayesian Additive Regression Trees (BARTs) [#4183](https://github.com/pymc-devs/pymc3/pull/4183))
1920

2021

2122
## PyMC3 3.9.3 (11 August 2020)

pymc3/sampling.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,8 @@ def sample(
607607
trace.report._t_sampling = t_sampling
608608

609609
if "variable_inclusion" in trace.stat_names:
610-
variable_inclusion = np.vstack(trace.get_sampler_stats("variable_inclusion"))
611-
variable_inclusion = np.vstack(
612-
[v.sum(0) / v.sum() for v in np.array_split(variable_inclusion, 50)]
613-
)
614-
trace.report.variable_importance = np.empty((variable_inclusion.shape[1], 3))
615-
trace.report.variable_importance[:, 0] = variable_inclusion.mean(0)
616-
trace.report.variable_importance[:, 1:3] = arviz.hdi(variable_inclusion, hdi_prob=0.68)
610+
variable_inclusion = np.stack(trace.get_sampler_stats("variable_inclusion")).mean(0)
611+
trace.report.variable_importance = variable_inclusion / variable_inclusion.sum()
617612

618613
n_chains = len(trace.chains)
619614
_log.info(

pymc3/step_methods/pgbart.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import logging
16+
1517
import numpy as np
1618
from theano import function as theano_function
1719

@@ -21,6 +23,8 @@
2123
from ..model import modelcontext
2224
from ..theanof import inputvars, make_shared_replacements, join_nonshared_inputs
2325

26+
_log = logging.getLogger("pymc3")
27+
2428

2529
class PGBART(ArrayStepShared):
2630
"""
@@ -52,6 +56,7 @@ class PGBART(ArrayStepShared):
5256
stats_dtypes = [{"variable_inclusion": np.ndarray}]
5357

5458
def __init__(self, vars=None, num_particles=10, max_stages=5000, chunk="auto", model=None):
59+
_log.warning("The BART model is experimental. Use with caution.")
5560
model = modelcontext(model)
5661
vars = inputvars(vars)
5762
self.bart = vars[0].distribution

0 commit comments

Comments
 (0)