structure learning for BBN, create DBN structure, learning the parameter of created DBN without GeNIe only using pysmile

The engine.
Post Reply
Yang Yajie
Posts: 31
Joined: Thu Mar 19, 2020 11:49 am

structure learning for BBN, create DBN structure, learning the parameter of created DBN without GeNIe only using pysmile

Post by Yang Yajie »

Dear sir or madam,
I am recently using large-scale data. But because of privacy, the GeNIe software can not be used, only pysmile package can be used. Before i usually learn the BBN structure (with background setting) to extract the relationships among variables year by year, then combine all of them into one DBN network, then learn the parameter of DBN, all these three steps were did by using GeNIe software. then i import this learned DBN into python to make the inference. for now, I can not use GeNIe software. so i have several questions about how to realize the same function by pysmile.

my questions are:
1. can i do all these three steps only by using pysmile package?
2. i noticed the smile wrapper is very simple. such as below and "To specify the background knowledge, use BayesianSearch.setBkKnowledge or
PC.setBkKnowledge methods." to describe background knowledge setting. my question is how can i set background knowledge? normally i add forbidden in one gkno file and write "<forbid from="Age" to="Gender" />" and "<forbid from="Age" to="Gender_1" />".
ds = pysmile.learning.DataSet()
net = pysmile.Network()
# load network and data here
matching = ds.match_network(net)
em = pysmile.learning.EM()
em.learn(ds, net, matching)
3. when I create a DBN by using pysmile, do I still need to save it to 'name.xdsl' type and then read in python?
4. after I create the structure of DBN, how can I learn the parameter of DBN in python by using pysmile? Should the name of variables still be Age_1, Age_2 to represent the variables in different year?
5. usually, after learned the structure of BBN, in GeNIe, I will press the bottom "strength of influence" and "show arc list" to check the weighted of arcs. could you please tell me how can i realize the same function in python by pysmile?

Thanks for your time! thank you very much in advance!
Post Reply