Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,32 @@ Install from [pypi](https://pypi.org/project/fake-data-for-learning/): `pip inst

### Optional dependencies

Note that the methods of `utils.ProbabilityPolytope` that use polytope calculatations to generate conditional probability tables subject to constraints on expectation value use the non-pure-python library [pypoman](https://github.com/stephane-caron/pypoman). See the [installation instructions](https://github.com/stephane-caron/pypoman#installation) for external dependency instructions.
Note that the methods of `utils.ProbabilityPolytope` that use polytope calculations to generate conditional probability tables subject to constraints on expectation value require the non-pure-python library [pypoman](https://github.com/stephane-caron/pypoman). System dependencies include [`cython`](https://cython.org) and [`glpk`](https://www.gnu.org/software/glpk/). See the [installation instructions](https://github.com/stephane-caron/pypoman#installation) for external dependency instructions.

By default the dependencies for `utils.ProbabilityPolytope` are not installed; to do so, run from your virtual environment `pip install 'fake-data-for-learning[probability_polytope]'`
On Mac OS X, these can be installed with

```console
brew install cython glpk cddlib gmp
```

(see also the [pycddlib](https://github.com/mcmtroffaes/pycddlib) issue [Installation using pip on MacOS 11.6 #49](https://github.com/mcmtroffaes/pycddlib/issues/49), but beware the typo in the first comment dependency name).

Follow the instructions regarding setting environment variables (e.g. in your `.bashrc` or `.zshrc` files). For example, your `.zshrc` file on Mac OS X might contain

```bash
# openblas
export LDFLAGS="-L/opt/homebrew/opt/openblas/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openblas/include"

# pycddlib
export CFLAGS="-I$(brew --prefix)/include -L$(brew --prefix)/lib"
export PATH="/opt/homebrew/opt/cython/bin:$PATH"

# For pkg-config to find openblas you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig"
```

By default the python dependencies for `utils.ProbabilityPolytope` are not installed; to do so, run from your virtual environment `pip install 'fake-data-for-learning[probability_polytope]'`

### Local development

Expand All @@ -101,6 +124,10 @@ This package exists because I became tired of googling for existing implementati

## Change log

### v0.4.5

Add to Mac OS X optional install instructions.

### v0.4.4

Fix missing usage of optional dependency specification
Expand All @@ -119,4 +146,4 @@ Fix dependencies' API changes.

### v0.4.0

This release adds a method for generating categorical data whose (multidimensional) contingency table equals a given one. The motivation is to generate fake data exhibiting [Simpson's paradox](https://en.wikipedia.org/wiki/Simpson%27s_paradox).
This release adds a method for generating categorical data whose (multidimensional) contingency table equals a given one. The motivation is to generate fake data exhibiting [Simpson's paradox](https://en.wikipedia.org/wiki/Simpson%27s_paradox).
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

setup(
name='fake_data_for_learning',
version='0.4.4',
version='0.4.5',
long_description=description,
long_description_content_type='text/markdown',
project_urls={
Expand Down