diff options
author | Luis Martinez | 2021-10-04 23:29:08 -0500 |
---|---|---|
committer | Luis Martinez | 2021-10-04 23:29:08 -0500 |
commit | 4437dc6ed2f19403ff97e82778928b4fe40d63e0 (patch) | |
tree | a560d28faebdc13fe58fe18daa53ee40ba256994 | |
parent | 0209419d0c49248766ff16956c86a2ae0138ab35 (diff) | |
download | aur-4437dc6ed2f19403ff97e82778928b4fe40d63e0.tar.gz |
update to 0.1.16
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | CHANGELOG.md | 154 | ||||
-rw-r--r-- | PKGBUILD | 50 |
3 files changed, 207 insertions, 19 deletions
@@ -1,21 +1,27 @@ pkgbase = python-pgmpy - pkgdesc = A library for Probabilistic Graphical Models - pkgver = 0.1.12 + pkgdesc = Probabilistic Graphical Model library + pkgver = 0.1.16 pkgrel = 1 url = https://github.com/pgmpy/pgmpy + changelog = CHANGELOG.md arch = any license = MIT makedepends = python-setuptools + makedepends = python-sphinx + makedepends = python-nbsphinx + makedepends = python-sphinx_rtd_theme + depends = python>=3.7 + depends = python-joblib depends = python-networkx + depends = python-numpy depends = python-pandas - depends = python-scikit-learn depends = python-pyparsing + depends = python-scipy + depends = python-scikit-learn depends = python-statsmodels - depends = python-tqdm - depends = python-pyparsing depends = python-pytorch - source = https://pypi.io/packages/source/p/pgmpy/pgmpy-0.1.12.tar.gz - sha256sums = ff5b8b8ef3c22642a499d6b1633035800185de4628fb380f9fb78db08f71b7e4 + depends = python-tqdm + source = python-pgmpy-0.1.16.tar.gz::https://github.com/pgmpy/pgmpy/archive/v0.1.16.tar.gz + sha256sums = 4bd3b82a65a406e24f82ecffa5eda6ab8133220272a7e5471a134fcb0ec33ee5 pkgname = python-pgmpy - diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000000..8277d6ea9fed --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,154 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.16] - 2021-09-30 +### Added +1. Adds a `fit_update` method to `BayesianNetwork` for updating model using new data. +2. Adds `simulate` method to `BayesianNetwork` and `DynamicBayesianNetwork` to simulated data under different conditions. +3. Adds `DynamicBayesianNetwork.fit` method to learn model paramters from data. +4. `ApproxInference` class to do approximate inference on models using sampling. +5. Robust tests for all sampling methods. +6. Adds `BayesianNetwork.load` and `BayesianNetwork.save` to quickly read and write files. + +### Changed +1. `BayesianModel` and `MarkovModel` renamed to `BayesianNetwork` and `MarkovNetwork` respectively. +2. The default value of node position in `DAG.to_daft` method. +3. Documentation updated on the website. + +### Fixed +1. Fixes bug in `DAG.is_iequivalent` method. +2. Automatically truncate table when CPD is too large. +3. Auto-adjustment of probability values when they don't exactly sum to 1. +4. tqdm works both in notebooks and terminal. +5. Fixes bug in `CausalInference.query` method. + +## [0.1.15] - 2021-06-30 +### Added +1. Adds network pruning for inference algrithms to reduce the size of network before + running inference. +2. Adds support for latent variables in DAG and BayesianModel. +3. Parallel implementation for parameter estimation algorithms. +4. Adds `DAG.get_random` and `BayesianModel.get_random` methods to be able to generate random models. +5. Adds `CausalInference.query` method for doing do operation inference with or without adjustment sets. +6. Adds functionality to treesearch to do auto root and class node selection (#1418) +7. Adds option to specify virtual evidence in bayesian network inference. +8. Adds Expectation-Maximization (EM) algorithm for parameter estimation in latent variable models. +9. Add `BDeuScore` as another option for structure score when using HillClimbSearch. +10. Adds CausalInference.get_minimal_adjustment_set` for finding adjustment sets. + +### Changed +1. Renames `DAG.is_active_trail` to `is_dconnected`. +2. `DAG.do` can accept multiple variables in the argument. +3. Optimizes sampling methods. +4. CI moved from travis and appveyor to github actions. +5. Drops support for python 3.6. Requires 3.7+. + +### Fixed +1. Example model files were not getting included in the pypi and conda packages. +2. The order of values returned by CI tests was wrong. #1403 +3. Adjusted and normalized MI wasn't working properly in TreeSearch. +4. #1423: Value error in bayesian estimation. +5. Fixes bug in `DiscreteFactor.__eq__` to also consider the state names order. + +## [0.1.14] - 2021-03-31 +### Added +1. Adds support for python 3.9. +2. `BayesianModelProbability` class for calculating pmf for BNs. +3. BayesianModel.predict has a new argument `stochastic` which returns stochastic results instead of MAP. +4. Adds new method pgmpy.base.DAG.to_daft to easily convert models into publishable plots. + +### Changed +1. `pgmpy.utils.get_example_model` now doesn't need internet connection to work. Files moved locally. + +### Fixed +1. Latex output of `pgmpy.DAG.get_independencies`. +2. Bug fix in PC algorithm as it was skipping some combinations. +3. Error in sampling because of seed not correctly set. + +## [0.1.13] - 2020-12-30 +### Added +1. New conditional independence tests for discrete variables + +### Changed +1. Adds warning in BayesianEstimator when using dirichlet prior. + +### Fixed +1. Bug in `PC.skeleton_to_pdag`. +2. Bug in `HillClimbSearch` when no legal operations. + +### Removed + +## [0.1.12] - 2020-09-30 +### Added +1. PC estimator with original, stable, and parallel variants. +2. PDAG class to represent partially directed DAGs. +3. `pgmpy.utils.get_example_model` function to fetch models from bnlearn repository. +4. Refactor HillClimbSearch with a new feature to specify fixed edges in the model. +5. Adds a global `SHOW_PROGRESS` variable. +6. Adds Chow-Liu structure learning algorithm. +7. Add `pgmpy.utils.get_example_model` to fetch models from bnlearn's repository. +8. Adds `get_value` and `set_value` method to `DiscreteFactor` to get/set a single value. +9. Adds `get_acestral_graph` to `DAG`. + +### Changed +1. Refactors ConstraintBasedEstimators into PC with a lot of general improvements. +2. Improved (faster, new arguments) indepenedence tests with changes in argument. +3. Refactors `sample_discrete` method. Sampling algorithms much faster. +4. Refactors `HillClimbSearch` to be faster. +5. Sampling methods now return dataframe of type categorical. + +### Fixed + +### Removed +1. `Data` class. + +## [0.1.11] - 2020-06-30 +### Added +- New example notebook: Alarm.ipynb +- Support for python 3.8 +- Score Caching support for scoring methods. + +### Changed +- Code quality check moved to codacy from landscape +- Additional parameter `max_ci_vars` for `ConstraintBasedEstimator`. +- Additional parameter `pseudo_count` for K2 score. +- Sampling methods return state names instead of number when available. +- XMLBIFReader and BIFReader not accepts argument for specifying state name type. + +### Fixed +- Additional checks for TabularCPD values shape. +- `DiscreteFactor.reduce` accepts both state names and state numbers for variables. +- `BeliefPropagation.query` fixed to return normalized CPDs. +- Bug in flip operation in `HillClimbSearch`. +- BIFWriter to write the state names to file if available. +- `BayesianModel.to_markov_model` fixed to work with disconnected graphs. +- VariableElimination fixed to not ignore identifical factors. +- Fixes automatic sorting of state names in estimators. + +### Removed +- No support for ProbModelXML file format. + +## [0.1.10] - 2020-01-22 +### Added +- Documentation updated to include Structural Equation Models(SEM) and Causal Inference. +- Adds Mmhc estimator. + +### Changed +- 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. + +### Fixed +- 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. + +### Removed +- six not a dependency anymore. @@ -1,21 +1,49 @@ +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> + pkgname=python-pgmpy -pkgver=0.1.12 +pkgver=0.1.16 pkgrel=1 -pkgdesc="A library for Probabilistic Graphical Models" -arch=(any) +pkgdesc="Probabilistic Graphical Model library" +arch=('any') url="https://github.com/pgmpy/pgmpy" license=('MIT') -makedepends=('python-setuptools') -depends=('python-networkx' 'python-pandas' 'python-scikit-learn' 'python-pyparsing' 'python-statsmodels' 'python-tqdm' 'python-pyparsing' 'python-pytorch') -source=("https://pypi.io/packages/source/p/pgmpy/pgmpy-$pkgver.tar.gz") -sha256sums=('ff5b8b8ef3c22642a499d6b1633035800185de4628fb380f9fb78db08f71b7e4') +depends=( + 'python>=3.7' + 'python-joblib' + 'python-networkx' + 'python-numpy' + 'python-pandas' + 'python-pyparsing' + 'python-scipy' + 'python-scikit-learn' + 'python-statsmodels' + 'python-pytorch' + 'python-tqdm') +makedepends=( + 'python-setuptools' + 'python-sphinx' + 'python-nbsphinx' + 'python-sphinx_rtd_theme') +# checkdepends=('python-pytest' 'python-mock' 'python-daft') +changelog=CHANGELOG.md +source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") +sha256sums=('4bd3b82a65a406e24f82ecffa5eda6ab8133220272a7e5471a134fcb0ec33ee5') build() { - cd pgmpy-$pkgver - python setup.py build + cd "pgmpy-$pkgver" + python setup.py build + cd docs + make man BUILDDIR=_build } +# check() { +# cd "pgmpy-$pkgver" +# pytest +# } + package() { - cd pgmpy-$pkgver - python setup.py install --root="$pkgdir/" --optimize=1 + cd "pgmpy-$pkgver" + PYTHONHASHSEED=0 python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" + install -Dm 644 docs/_build/man/pgmpy.1 -t "$pkgdir/usr/share/man/man1/" } |