summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2023-05-21 16:57:29 -0500
committerCarlos Aznarán Laos2023-05-21 16:57:29 -0500
commitc0b06f1586da5104d90b699c81dcd4509b442a17 (patch)
treefbabf3e25e43e262650f45979b8e51f3924c6d78
parent364bc4aa03d4962fcee2156c02e6c5275092d7a6 (diff)
downloadaur-c0b06f1586da5104d90b699c81dcd4509b442a17.tar.gz
Bump version to 0.1.22
-rw-r--r--.SRCINFO23
-rw-r--r--CHANGELOG.md196
-rw-r--r--PKGBUILD74
3 files changed, 35 insertions, 258 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 28f6d80337cb..a73f7af4b5d2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,36 +1,29 @@
pkgbase = python-pgmpy
- pkgdesc = Probabilistic Graphical Model library
- pkgver = 0.1.20
+ pkgdesc = A library for Probabilistic Graphical Models
+ pkgver = 0.1.22
pkgrel = 1
url = https://github.com/pgmpy/pgmpy
- changelog = CHANGELOG.md
arch = any
license = MIT
checkdepends = python-pytest
checkdepends = python-mock
checkdepends = python-daft
- makedepends = python-setuptools
makedepends = python-build
makedepends = python-installer
+ makedepends = python-setuptools
makedepends = python-wheel
- 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-opt_einsum
- depends = python-pandas
- depends = python-pyparsing
- depends = python-scipy
depends = python-scikit-learn
- depends = python-statsmodels
depends = python-pytorch
+ depends = python-statsmodels
depends = python-tqdm
+ depends = python-joblib
+ depends = python-opt_einsum
optdepends = python-daft
optdepends = python-lxml
- source = python-pgmpy-0.1.20.tar.gz::https://github.com/pgmpy/pgmpy/archive/v0.1.20.tar.gz
- sha256sums = 5069daaa472be8de392ba3f5798fe639fc8b6204d3d50baa2bd8d35390ab7250
+ source = pgmpy-0.1.22.tar.gz::https://github.com/pgmpy/pgmpy/archive/v0.1.22.tar.gz
+ sha512sums = adf2e1ad1c42b0f468d281d2b40634c04cfe0cb7fefd05892b843bdc6c32a03a2522b156746168c185d98c1d0a3486c4e1b12fefa73e468b96da56e7f290591c
pkgname = python-pgmpy
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 36f02a6e4588..000000000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,196 +0,0 @@
-# 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.20] - 2022-09-30
-### Added
-1. `BayesianNetwork.get_random_cpds` method to randomly parameterize a network structure.
-2. Faster Variable Elimination using tensor contraction.
-3. `factors.factor_sum_product` method for faster sum-product operations using tensor contraction.
-
-### Fixed
-1. Bug in `DynamicBayesianNetwork.initialize_initial_state`. #1564
-2. Bug in `factors.factor_product`. #1565
-
-### Changed
-1. Runtime improvements in `DiscreteFactor.marginalize` and `DiscreteFactor.copy` methods.
-
-## [0.1.19] - 2022-06-30
-### Added
-1. Adds checks for arguments to `BayesianNetwork.simulate` method.
-
-### Fixed
-1. Fixes TAN algorithm to use conditional information metric.
-2. Speed ups for all estimation and inference methods.
-3. Fix in stable variant of PC algorithm to give reproducible results.
-4. Fix in `GibbsSampling` for it to work with variables with integral names.
-5. `DAG.active_trail_nodes` allows tuples as variable names.
-6. Fixes CPD and edge creation in `UAIReader`.
-
-## [0.1.18] - 2022-03-30
-### Fixed
-1. Fixes `CausalInference.is_valid_backdoor_adjustment_set` to accept str arguments for `Z`.
-2. Fixes `BayesianNetwork.remove_cpd` to work with integral node names.
-3. Fixes `MPLP.map_query` to return the variable states instead of probability values.
-4. Fixes BIFWriter to generate output in standard BIF format.
-
-## [0.1.17] - 2021-12-30
-### Added
-1. Adds BayesianNetwork.states property to store states of all the variables.
-2. Adds extra checks in check model for state names
-
-### Fixed
-1. Fixes typos in BayesianModel deprecation warning
-2. Bug fix in printing Linear Gaussian CPD
-3. Update example notebooks to work on latest dev.
-
-## [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.
diff --git a/PKGBUILD b/PKGBUILD
index dde7855a4c78..8f1eebae0b19 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,61 +1,41 @@
-# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
-
-pkgname=python-pgmpy
-_pkg="${pkgname#python-}"
-pkgver=0.1.20
+# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
+_base=pgmpy
+pkgname=python-${_base}
+pkgver=0.1.22
pkgrel=1
-pkgdesc="Probabilistic Graphical Model library"
-arch=('any')
-url="https://github.com/pgmpy/pgmpy"
-license=('MIT')
-depends=(
- 'python>=3.7'
- 'python-joblib'
- 'python-networkx'
- 'python-numpy'
- 'python-opt_einsum'
- 'python-pandas'
- 'python-pyparsing'
- 'python-scipy'
- 'python-scikit-learn'
- 'python-statsmodels'
- 'python-pytorch'
- 'python-tqdm')
+pkgdesc="A library for Probabilistic Graphical Models"
+arch=(any)
+url="https://github.com/${_base}/${_base}"
+license=(MIT)
+depends=(python-networkx python-scikit-learn python-pytorch python-statsmodels python-tqdm python-joblib python-opt_einsum)
optdepends=('python-daft' 'python-lxml')
-makedepends=(
- 'python-setuptools'
- 'python-build'
- 'python-installer'
- 'python-wheel'
- '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=('5069daaa472be8de392ba3f5798fe639fc8b6204d3d50baa2bd8d35390ab7250')
+makedepends=(python-build python-installer python-setuptools python-wheel python-nbsphinx python-sphinx_rtd_theme)
+checkdepends=(python-pytest python-mock python-daft)
+source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
+sha512sums=('adf2e1ad1c42b0f468d281d2b40634c04cfe0cb7fefd05892b843bdc6c32a03a2522b156746168c185d98c1d0a3486c4e1b12fefa73e468b96da56e7f290591c')
prepare() {
- cd "$_pkg-$pkgver"
- sed -i '/"tests"/s/tests/*tests*/' setup.py
+ sed -i '/"tests"/s/tests/*tests*/' ${_base}-${pkgver}/setup.py
}
build() {
- cd "$_pkg-$pkgver"
- python -m build --wheel --no-isolation
- make -C docs man BUILDDIR=_build
+ cd ${_base}-${pkgver}
+ python -m build --wheel --skip-dependency-check --no-isolation
+ make -C docs man BUILDDIR=_build
}
check() {
- cd "$_pkg-$pkgver"
- pytest -x --disable-warnings
+ cd ${_base}-${pkgver}
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m installer dist/*.whl
+ test-env/bin/python -m pytest
}
package() {
- cd "$_pkg-$pkgver"
- PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
- install -Dm644 docs/_build/man/pgmpy.1 -t "$pkgdir/usr/share/man/man1/"
- local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
- install -d "$pkgdir/usr/share/licenses/$pkgname/"
- ln -s "$_site/pgmpy-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
+ cd ${_base}-${pkgver}
+ PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
+ install -Dm644 docs/_build/man/${_base}.1 -t "$pkgdir/usr/share/man/man1/"
+ install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}