Metadata-Version: 2.4
Name: pymob
Version: 0.5.6a5
Summary: Modelling platform for Python
Author-email: Florian Schunck <fluncki@protonmail.com>
License: MIT License
        
        Copyright (c) 2023 Florian
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/flo-schu/pymob
Project-URL: Issue Tracker, https://github.com/flo-schu/pymob/issues
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: arviz~=0.20
Requires-Dist: click~=8.1.3
Requires-Dist: dpath~=2.1.6
Requires-Dist: matplotlib~=3.7.1
Requires-Dist: numpy~=1.24.0
Requires-Dist: pandas~=2.0.2
Requires-Dist: prettytable~=3.7.0
Requires-Dist: scipy~=1.10.1
Requires-Dist: scikit-learn~=1.2.2
Requires-Dist: tqdm~=4.65.0
Requires-Dist: toopy==0.6.0
Requires-Dist: xarray~=2023.11.0
Requires-Dist: sympy~=1.12
Requires-Dist: pydantic~=2.5.2
Requires-Dist: frozendict~=2.3.10
Requires-Dist: numpydantic~=1.3.0
Requires-Dist: nptyping~=2.5
Requires-Dist: tabulate>=0.9.0
Provides-Extra: dev
Requires-Dist: pytest>=7.3; extra == "dev"
Requires-Dist: pyinstrument>=4.5; extra == "dev"
Requires-Dist: bumpver; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: jupyter-core; extra == "dev"
Requires-Dist: nbconvert; extra == "dev"
Requires-Dist: jupytext; extra == "dev"
Requires-Dist: ipykernel; extra == "dev"
Requires-Dist: ipywidgets; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx==7.2.6; extra == "docs"
Requires-Dist: myst-parser==2.0.0; extra == "docs"
Requires-Dist: sphinx-book-theme==1.1.0; extra == "docs"
Requires-Dist: pydata-sphinx-theme==0.15.1; extra == "docs"
Requires-Dist: sphinxcontrib-applehelp==1.0.8; extra == "docs"
Requires-Dist: sphinxcontrib-devhelp==1.0.6; extra == "docs"
Requires-Dist: sphinxcontrib-htmlhelp==2.0.5; extra == "docs"
Requires-Dist: sphinxcontrib-jsmath==1.0.1; extra == "docs"
Requires-Dist: sphinxcontrib-qthelp==1.0.7; extra == "docs"
Requires-Dist: sphinxcontrib-serializinghtml==1.1.10; extra == "docs"
Requires-Dist: myst-nb; extra == "docs"
Provides-Extra: pyabc
Requires-Dist: pyabc~=0.12.3; extra == "pyabc"
Requires-Dist: pathos~=0.3.1; extra == "pyabc"
Provides-Extra: numpyro
Requires-Dist: jax==0.4.21; extra == "numpyro"
Requires-Dist: jaxlib==0.4.21; extra == "numpyro"
Requires-Dist: sympy==1.12; extra == "numpyro"
Requires-Dist: sympy2jax==0.0.5; extra == "numpyro"
Requires-Dist: numpyro==0.13.2; extra == "numpyro"
Requires-Dist: diffrax==0.4.1; extra == "numpyro"
Requires-Dist: graphviz; extra == "numpyro"
Provides-Extra: pymoo
Requires-Dist: pymoo~=0.6.0; extra == "pymoo"
Requires-Dist: pathos~=0.3.1; extra == "pymoo"
Provides-Extra: interactive
Requires-Dist: ipywidgets~=8.1.1; extra == "interactive"
Requires-Dist: IPython~=8.17.2; extra == "interactive"
Dynamic: license-file

# Pymob

![testing](https://github.com/flo-schu/pymob/actions/workflows/python-test.yml/badge.svg)
![build](https://github.com/flo-schu/pymob/actions/workflows/python-release.yml/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/pymob/badge/?version=latest)](https://pymob.readthedocs.io/en/latest/?badge=latest)

Pymob is a **Py**thon based **mo**del **b**uilding platform. It abstracts repetitive
tasks in the modeling process so that you can focus on building models, asking questions to the real world and learn from observations.

The idea of `pymob` originated from the frustration with fitting complex models to complicated datasets (missing observations, non-uniform data structure, non-linear models, ODE models). In such scenarios a lot of time is spent matching observations with model results.

The main strength of `pymob` is to provide a uniform interface for describing models and using this model to fit a variety of state-of-the-art optimization and inference algorithms on it.

Currently, supported inference backends are:
- interactive (interactive backend in jupyter notebookswith parameter sliders)
- numpyro (bayesian inference and stochastic variational inference)
- pyabc (approximate bayesian inference)
- pymoo (experimental! multi-objective optimization)

## A word on nomenclature

::note:: Parameter estimation, parameter inference and parameter optimization have the same meaning within the scope of this package. While there are distinctions between parameter optimization, inference and estimation, pymob ignores these differences when talking about the process of using observations to describe relationships between cause and effect. For consistency we borrow the term "infer" to describe this process. Whenever, parameters are inferred or parameter inference is done in the scope of this work, it refers to the process of fitting a model to data and thus identify the processes in the model, described by model parameters. 

Using the same term for similar processes, breaks down barriers between frequentist and bayesian approaches. Bayesian and frequentist ideologies are sometimes fiercly fought, but much of their reasoning is based on the same fundament. We acknowledge the differences, but appreciate that for some models, frequentist approaches are more suitable and for others bayesian approaches bring advantages. By using the same interface for both **inference** tools, the user can seamlessly switch between *both worlds* and explore the differences and advantages of either tool.

Because this is what they are. Tools. Tools, to learn from data and ask meaningful questions!

## Installation

To install pymob `pip install pymob`

Backends can be installed with e.g. `pip install pymob[numpyro]`

Pymob is under active development. It is used and developed within multiple projects simultaneously and in order to maintain a consistent release history, the main work is done in project-branches which contain the most cutting-edge features. These can always checked out locally, but may not be working correctly. Instead, it is recommended to install alpha-versions. 

E.g. `pip install pymob==0.3.0a5` which is the 5th alpha release of a project branch that was based on pymob v0.2.x.

::warning:: It may be possible that different projects release on the same minor version. In this case the release notes (https://github.com/flo-schu/pymob/releases) should be reviewed to see which project it refers to.


### Install a development version

```bash
git clone git@github.com:flo-schu/pymob.git
conda create -n pymob python=3.11
pip install -e pymob[dev]
pre-commit install
```

Further inference backends may be installed with `pip install -e pymob[numpyro,pyabc,pymoo,interactive]`

## Documentation

The documentation is available on https://pymob.readthedocs.io/en/latest/


## Roadmap

`pymob` is a work in progress. As it is actively used in more projects the package will be maturing and delivering a smoother user experience. The design principle of pymob is that it will incorporate features that are repeatedly needed in research projects in order to keep the API lean and focus on providing code that matters and helps.

The future plans for pymob can be viewed in https://github.com/users/flo-schu/projects/10/views/10

## Getting started

In 0.3.0 the use is still a bit bumpy. The easiest way is currently to copy the lotka_volterra_case_study and get started from there.

In 0.4.0 a new configuration backend based on `pydantic` will be added. This will considerably ease the use of `pymob` as the API will be supported with rich type hints and helpful error messages.
