is there a way to output goodness-of-fit metric such as BIC, log likelihood score?

The engine.
Post Reply
BayesFusionUser123
Posts: 15
Joined: Tue Jun 10, 2025 3:51 pm

is there a way to output goodness-of-fit metric such as BIC, log likelihood score?

Post by BayesFusionUser123 »

Dear Support team,

I am following the PDF version of the tutorial for SMILE wrappers, specifically for the Python language.

Is there a way to output goodness-of-fit metric such as BIC, log likelihood score, given a predefined network structure and a dataset?

BIC score (Bayesian Information Criterion): the scoring functions in probabilistic graphical models and Bayesian networks after the EM (Expectation-Maximization) parameter estimation step.

Thank you very much for your answer.
shooltz[BayesFusion]
Site Admin
Posts: 1468
Joined: Mon Nov 26, 2007 5:51 pm

Re: is there a way to output goodness-of-fit metric such as BIC, log likelihood score?

Post by shooltz[BayesFusion] »

You can obtain the log likelihood after EM by calling the EM.get_last_score() method.

BayesianSearch.get_last_score() returns the Bayesian score after learning.

Currently there's no method to calculate BIC from the dataset and network without learning.
shooltz[BayesFusion]
Site Admin
Posts: 1468
Joined: Mon Nov 26, 2007 5:51 pm

Re: is there a way to output goodness-of-fit metric such as BIC, log likelihood score?

Post by shooltz[BayesFusion] »

BTW, you can use GeNIe to calculate loglikelihood for a dataset/network without learning. This functionality is not exposed in PySMILE, however.
shooltz[BayesFusion]
Site Admin
Posts: 1468
Joined: Mon Nov 26, 2007 5:51 pm

Re: is there a way to output goodness-of-fit metric such as BIC, log likelihood score?

Post by shooltz[BayesFusion] »

One more thing, we're now working on additional structure learning algorithms and there will be a way to calculate BIC for network+dataset directly.
Post Reply