1 year ago

#342080

test-img

Ankur

How to calculate the probability at a given condition when I know the outcome in pymc3?

import arviz as az
import matplotlib.pyplot as plt
import numpy as np
import pymc3 as pm
from pymc3.math import dot, exp
import pandas as pd

        trace = pm.sample(
            10000,
            chains=4,
            tune=400,
            return_inferencedata=True,
        )

    summary = az.summary(trace, hdi_prob=0.95)
    print(summary)

with m:
   pm.set_data({"condition1": [val1], "condition2": [val2], "condition3": 
   [val3]})
   ppc = pm.sample_posterior_predictive(trace)

In the above code I have the values of three condition available and I know the output as well, I want to calculate the probability of arriving at that output.

python

statistics

bayesian

pymc3

0 Answers

Your Answer

Accepted video resources