library(bnlearn) data(alarm) alarmhc.bn <- hc(alarm) alarmhc.bn score(alarmhc.bn,alarm,type="bic") alarmtabu.bn <- tabu(alarm) alarmtabu.bn score(alarmtabu.bn,alarm,type="bic") library(reticulate) m <- import("pygobnilp.gobnilp")$Gobnilp() m$learn(alarm,plot=FALSE,score='DiscreteBIC') m$learned_bn score(model2network(m$learned_bn$bnlearn_modelstring()),alarm,type="bic") data(hailfinder) hailfinderhc.bn <- hc(hailfinder) hailfinderhc.bn score(hailfinderhc.bn,hailfinder,type="bic") hailfindertabu.bn <- tabu(hailfinder) hailfindertabu.bn score(hailfindertabu.bn,hailfinder,type="bic") m$learn(hailfinder,plot=FALSE,score='DiscreteBIC') m$learned_bn score(model2network(m$learned_bn$bnlearn_modelstring()),hailfinder,type="bic") data(insurance) insurancehc.bn <- hc(insurance) insurancehc.bn score(insurancehc.bn,insurance,type="bic") insurancetabu.bn <- tabu(insurance) insurancetabu.bn score(insurancetabu.bn,insurance,type="bic") m$learn(insurance,plot=FALSE,score='DiscreteBIC') m$learned_bn score(model2network(m$learned_bn$bnlearn_modelstring()),insurance,type="bic")