Skip to content

Automatically train a global Bayesian Network from multiple heterogeneous data sources

License

Notifications You must be signed in to change notification settings

henry-zhang-bohan/autopgm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autopgm

Automatically train a merged Bayesian Network from multiple data sources

Installation

Using pip: open autopgm folder, and run

$ pip3 install .

Bayesian Data Integration

Model training

In python3, run

from autopgm.estimator import MultipleBayesianEstimator
model = MultipleBayesianEstimator([csv_file_name_1, csv_file_name_2, ...]).get_model()

Note: all files need to be .csv files with discrete variables of integer values.

Inference

model is a BayesianModel as in pgmpy. You can perform VariableElimination and then query as in pgmpy:

from pgmpy.inference import VariableElimination
inference = VariableElimination(model)
q = inference.query(['var1'], evidence={'var2': 0, 'var3': 1})['var1']

About

Automatically train a global Bayesian Network from multiple heterogeneous data sources

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages