# How to report on smc's log\_marginal\_likelihood in pymc5?

**URL:** <https://discourse.pymc.io/t/how-to-report-on-smcs-log-marginal-likelihood-in-pymc5/13014>\
**Category:** v5\
**Created:** [September 28, 2023, 10:46am UTC](https://discourse.pymc.io/t/how-to-report-on-smcs-log-marginal-likelihood-in-pymc5/13014 "2023-09-28T10:46:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bridgeland](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/bridgeland/32/2773_2.png) [@bridgeland](https://discourse.pymc.io/u/bridgeland)\
**Post date:** [September 28, 2023, 10:46am UTC](https://discourse.pymc.io/t/how-to-report-on-smcs-log-marginal-likelihood-in-pymc5/13014/1 "2023-09-28T10:46:45Z")

</div>

I am using Rob Zinkov’s (@zaxtax) superb [tour of model checking techniques](https://discourse.pymc.io/t/a-tour-of-model-checking-techniques-by-rob-zinkov/6056), from PyMCon 2020. In that tour, Rob uses **sample\_smc** and then reports on **log\_marginal\_likelihood** :

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/b/b00ee7f23bca4367934b8565db6d46a36fbb7524.png)

Unfortunately, Rob’s work was done in pymc3.9.3. PyMC 5 supports **sample\_smc** , which now provides its trace as a arviz **InferenceData** object, without a **report** property. How can **log\_marginal\_likehood** be reported now?

---

<div class="post-metadata">

**Author:** ![aloctavodia](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/aloctavodia/32/8642_2.png) [@aloctavodia](https://discourse.pymc.io/u/aloctavodia)\
**Post date:** [September 28, 2023, 1:11pm UTC](https://discourse.pymc.io/t/how-to-report-on-smcs-log-marginal-likelihood-in-pymc5/13014/2 "2023-09-28T13:11:45Z")

</div>

Hi @bridgeland the log-marginal-likelihood is stored in the `InferenceData` object under the `sample_stats` group.

Following your example it should be `partial_smc_trace.sample_stats["log_marginal_likelihood"]` you will get one value per chain (two in your example).
