A python package for rounding polytopes.
Project description
Efficient random sampling in convex polytopes relies on a ‘rounding’ preprocessing step, in which the polytope is rescaled so that the width is as uniform as possible across different dimensions. PolyRound rounds polytopes on the general form:
$`P := {x in mathcal{R}^n: A_{eq}x = b_{eq}, A_{ineq}x leq b_{ineq}}`$ with matrices $`A_{eq} in mathcal{R}^{m,n}`$ and $`A_{ineq}in mathcal{R}^{k,n}`$ and vectors $`b_{eq} in mathcal{R}^{m}`$ and $`b_{ineq}in mathcal{R}^{k}`$.
This formulation often arises in Systems Biology as the flux space of a metabolic network.
As output, PolyRound produces a polytope on the form $`P^{r} := {v in mathcal{R}^l: A^{r}_{ineq}v leq b^{r}_{ineq}}`$ where $`l leq n`$ and the zero vector is a stricly interior point. For transforming points back to the original space, it also provides a matrix $`S in mathcal{R}^{n,l}`$ and a vector $`t in mathcal{R}^{n}`$, so that $`x = Sv + t`$.
Currently, PolyRound is supported for python 3.7 and 3.8.
PolyRound no longer depends on a Gurobi installation and uses optlang (https://github.com/opencobra/optlang) to delegate linear programs to GLPK in case Gurobi is not installed. However, PolyRound is more reliable with Gurobi. Free Gurobi licenses for academic use can be obtained at https://www.gurobi.com/. Once the license is installed, the easiest way to get gurobi to work in python is through Anaconda https://www.anaconda.com/. Installation of gurobi in a conda environment is done with “conda install -c gurobi gurobi”.
An easy example of how to get started is presented in the jupyter notebook “example_usage”.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for PolyRound-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71826c7541fb36a15c0683a8548558848e44310cc14ab863b0e34ffbe6edd3f6 |
|
MD5 | 9cab0df47d6bb61d25d6a194ff77d8ac |
|
BLAKE2b-256 | 467077e8368625323d8a8dc157e944c08ef63bb4a5f018cf63698b2d55d0571b |