# Bayesian network for classification using PyMc or PyMc3

I am seraching for a while an example on how to use PyMc/PyMc3 to do classification task, but have not found an concludent example regarding on how to do the predicton on a new data point. I am currious if some could give me some references.

• Will be easier to help you if you post some code, maybe some toy-model May 24 '16 at 23:57

## 1 Answer

pymc will not provide you pretty sklearn-style .predict method for this case, however you can do it on your own. The idea is simple enough: you should draw coefficients for the classifier using pymc, and after it use them for the classifier itself manually.

You can see a very basic example at this blogpost or more complicated case at pymc3 documentation.

• Please make sure you're including the answer itself in your post, rather than a link to the answer. (I don't know enough about the subject to say whether or not you are, but in case you're not, I want to mention it)
– Nic
Mar 27 '17 at 23:06