'Fitting a Bayesian network with custom penalty

I would like to learn a Bayesian network from a set of samples. Pomegranate has a from_samples method, however it only contains a single penalty parameter, and I would like a custom penalty function. (i.e. I provide a function which takes the network in as input and gives a floating-point number representing the penalty as output.)

Are there any libraries which support this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source