Closed Wesserg closed 3 years ago
Ahh... best rescue is self rescue:
the sample() function has an argument that is not mentioned in the API, it's called "evidences=[{}]" so BayesianNetwork.sample(n=N, evindences=[my_evidence_dict]) should solve the problem!
Right?
Yes. Sorry about the documentation oversight. The sample function was implemented by someone else.
So.. in the Bayesian Networks patt we have the BayesianNetwork.sample() function, which does amazing job in sampling form the BNet distribution. But let's now say, that I know something about some variables and given that knowledge I want to sample (not predict) the remaining variables. Can I do that using existing functions?
I am looking for something in line with: BayesianNetwork.predict_proba(my conditions).sample()