Estimation of the parameters of networks from data

Let a dataset D = {G1, G2, Gi, … Gn} where each Gi is a DAG Gi=(Vi, Ei) with node set Vi and edge set Ei. Each node in Vi takes a value in set {red, blue, green}. The graphs Gi are distinct in the sense that they can have different number of nodes and different edge distributions.

Is there a way to use PyMC to estimate the distribution(s) of the vertices from the dataset D? For example, estimate probabilities like Prob(random node v is red | parent(v) is blue)?

Thanks.

Does this discussion help? Bayes Nets, Belief Networks, and PyMC

Thank you Ricardo for the instructive link. I initially thought about modeling the problem using a Bayesian network but I was not sure about the choice of the random variables, how effective it would be…