All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
BayesianNetwork.get_random_cpdsmethod to randomly parameterize a network structure.- Faster Variable Elimination using tensor contraction.
factors.factor_sum_productmethod for faster sum-product operations using tensor contraction.
- Bug in
DynamicBayesianNetwork.initialize_initial_state. #1564 - Bug in
factors.factor_product. #1565
- Runtime improvements in
DiscreteFactor.marginalizeandDiscreteFactor.copymethods.
- Adds checks for arguments to
BayesianNetwork.simulatemethod.
- Fixes TAN algorithm to use conditional information metric.
- Speed ups for all estimation and inference methods.
- Fix in stable variant of PC algorithm to give reproducible results.
- Fix in
GibbsSamplingfor it to work with variables with integral names. DAG.active_trail_nodesallows tuples as variable names.- Fixes CPD and edge creation in
UAIReader.
- Fixes
CausalInference.is_valid_backdoor_adjustment_setto accept str arguments forZ. - Fixes
BayesianNetwork.remove_cpdto work with integral node names. - Fixes
MPLP.map_queryto return the variable states instead of probability values. - Fixes BIFWriter to generate output in standard BIF format.
- Adds BayesianNetwork.states property to store states of all the variables.
- Adds extra checks in check model for state names
- Fixes typos in BayesianModel deprecation warning
- Bug fix in printing Linear Gaussian CPD
- Update example notebooks to work on latest dev.
- Adds a
fit_updatemethod toBayesianNetworkfor updating model using new data. - Adds
simulatemethod toBayesianNetworkandDynamicBayesianNetworkto simulated data under different conditions. - Adds
DynamicBayesianNetwork.fitmethod to learn model paramters from data. ApproxInferenceclass to do approximate inference on models using sampling.- Robust tests for all sampling methods.
- Adds
BayesianNetwork.loadandBayesianNetwork.saveto quickly read and write files.
BayesianModelandMarkovModelrenamed toBayesianNetworkandMarkovNetworkrespectively.- The default value of node position in
DAG.to_daftmethod. - Documentation updated on the website.
- Fixes bug in
DAG.is_iequivalentmethod. - Automatically truncate table when CPD is too large.
- Auto-adjustment of probability values when they don't exactly sum to 1.
- tqdm works both in notebooks and terminal.
- Fixes bug in
CausalInference.querymethod.
- Adds network pruning for inference algrithms to reduce the size of network before running inference.
- Adds support for latent variables in DAG and BayesianModel.
- Parallel implementation for parameter estimation algorithms.
- Adds
DAG.get_randomandBayesianModel.get_randommethods to be able to generate random models. - Adds
CausalInference.querymethod for doing do operation inference with or without adjustment sets. - Adds functionality to treesearch to do auto root and class node selection (#1418)
- Adds option to specify virtual evidence in bayesian network inference.
- Adds Expectation-Maximization (EM) algorithm for parameter estimation in latent variable models.
- Add
BDeuScoreas another option for structure score when using HillClimbSearch. - Adds CausalInference.get_minimal_adjustment_set` for finding adjustment sets.
- Renames
DAG.is_active_trailtois_dconnected. DAG.docan accept multiple variables in the argument.- Optimizes sampling methods.
- CI moved from travis and appveyor to github actions.
- Drops support for python 3.6. Requires 3.7+.
- Example model files were not getting included in the pypi and conda packages.
- The order of values returned by CI tests was wrong. #1403
- Adjusted and normalized MI wasn't working properly in TreeSearch.
- #1423: Value error in bayesian estimation.
- Fixes bug in
DiscreteFactor.__eq__to also consider the state names order.
- Adds support for python 3.9.
BayesianModelProbabilityclass for calculating pmf for BNs.- BayesianModel.predict has a new argument
stochasticwhich returns stochastic results instead of MAP. - Adds new method pgmpy.base.DAG.to_daft to easily convert models into publishable plots.
pgmpy.utils.get_example_modelnow doesn't need internet connection to work. Files moved locally.
- Latex output of
pgmpy.DAG.get_independencies. - Bug fix in PC algorithm as it was skipping some combinations.
- Error in sampling because of seed not correctly set.
- New conditional independence tests for discrete variables
- Adds warning in BayesianEstimator when using dirichlet prior.
- Bug in
PC.skeleton_to_pdag. - Bug in
HillClimbSearchwhen no legal operations.
- PC estimator with original, stable, and parallel variants.
- PDAG class to represent partially directed DAGs.
pgmpy.utils.get_example_modelfunction to fetch models from bnlearn repository.- Refactor HillClimbSearch with a new feature to specify fixed edges in the model.
- Adds a global
SHOW_PROGRESSvariable. - Adds Chow-Liu structure learning algorithm.
- Add
pgmpy.utils.get_example_modelto fetch models from bnlearn's repository. - Adds
get_valueandset_valuemethod toDiscreteFactorto get/set a single value. - Adds
get_acestral_graphtoDAG.
- Refactors ConstraintBasedEstimators into PC with a lot of general improvements.
- Improved (faster, new arguments) indepenedence tests with changes in argument.
- Refactors
sample_discretemethod. Sampling algorithms much faster. - Refactors
HillClimbSearchto be faster. - Sampling methods now return dataframe of type categorical.
Dataclass.
- New example notebook: Alarm.ipynb
- Support for python 3.8
- Score Caching support for scoring methods.
- Code quality check moved to codacy from landscape
- Additional parameter
max_ci_varsforConstraintBasedEstimator. - Additional parameter
pseudo_countfor K2 score. - Sampling methods return state names instead of number when available.
- XMLBIFReader and BIFReader not accepts argument for specifying state name type.
- Additional checks for TabularCPD values shape.
DiscreteFactor.reduceaccepts both state names and state numbers for variables.BeliefPropagation.queryfixed to return normalized CPDs.- Bug in flip operation in
HillClimbSearch. - BIFWriter to write the state names to file if available.
BayesianModel.to_markov_modelfixed to work with disconnected graphs.- VariableElimination fixed to not ignore identifical factors.
- Fixes automatic sorting of state names in estimators.
- No support for ProbModelXML file format.
- Documentation updated to include Structural Equation Models(SEM) and Causal Inference.
- Adds Mmhc estimator.
- BdeuScore is renamed to BDeuScore.
- Refactoring of NaiveBayes
- Overhaul of CI and setup infrastructure.
- query methods check for common variabls in variable and evidence argument.
- Example notebooks for Inference.
- DAG.moralize gives consistent results for disconnected graphs.
- Fixes problems with XMLBIF and BIF reader and writer classes to be consistent.
- Better integration of state names throughout the package.
- Improves remove_factors and add_factors methods of FactorGraph
- copy method of TabularCPD and DiscreteFactor now makes a copy of state names.
- six not a dependency anymore.