cofi-0.1.3.dev2
توضیحات
Common Framework for Inference
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cofi-0.1.3.dev2 |
| نام | cofi |
| نسخه کتابخانه | 0.1.3.dev2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | InLab, CoFI development team |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/cofi/ |
| مجوز | - |
# <img src="https://raw.githubusercontent.com/inlab-geo/cofi/main/docs/source/_static/latte_art_cropped.png" width="5%" style="vertical-align:bottom"/> CoFI (Common Framework for Inference)
[](https://pypi.org/project/cofi/)
[](https://anaconda.org/conda-forge/cofi)
[](https://cofi.readthedocs.io/en/latest/?badge=latest)
[](https://codecov.io/gh/inlab-geo/cofi)
[](https://join.slack.com/t/inlab-community/shared_invite/zt-1ejny069z-v5ZyvP2tDjBR42OAu~TkHg)
<!-- [](https://pypi.org/project/cofi/) -->
## Introduction
CoFI (Common Framework for Inference) is an open source initiative for interfacing between generic inference algorithms and specific geoscience problems.
With a mission to bridge the gap between the domain expertise and the inference expertise, CoFI provides an interface across a wide range of inference algorithms from different sources, underpinned by a rich set of domain relevant [examples](https://cofi.readthedocs.io/en/latest/examples/generated/index.html).
> This project and [documentation](https://cofi.readthedocs.io/en/latest/) are under initial development stage. Please feel free to contact us for feedback or issues!
## Installation
From PyPI:
```console
$ pip install cofi
```
Or alternatively, from conda-forge:
```console
$ conda install -c conda-forge cofi
```
Check CoFI documentation -
[installation page](https://cofi.readthedocs.io/en/latest/installation.html)
for details on dependencies and setting up with virtual environments.
## Basic Usage
CoFI API has flexible ways of defining an inversion problem. For instance:
```python
from cofi import BaseProblem
inv_problem = BaseProblem()
inv_problem.set_objective(my_objective_func)
inv_problem.set_initial_model(my_starting_point)
```
Once a problem is defined, `cofi` can tell you what inference tools you can use based on what level of
information you've provided:
```python
inv_problem.suggest_tools() # a tree will be printed
```
Run an inversion with these lines:
```python
from cofi import InversionOptions, Inversion
inv_options = InversionOptions()
inv_options.set_solving_method("optimization")
inv_options.set_params(options={"maxiter":100})
inv = Inversion(inv_problem, inv_options)
result = inv.run()
print(result.success)
print(result.model)
```
And now an inversion is completed! Check out our [example gallery](https://cofi.readthedocs.io/en/latest/examples/generated/index.html)
and [tutorial](https://cofi.readthedocs.io/en/latest/tutorials/generated/index.html) pages for more
real-world or advanced use cases.
## Contributing
Interested in contributing? Please check out our [contributor's guide](https://cofi.readthedocs.io/en/latest/contribute.html).
## Licence
This project is distributed under a 2-clause BSD licence. A copy of this licence is
provided with distributions of the software.
نیازمندی
| مقدار | نام |
|---|---|
| >=1.18 | numpy |
| >=1.0.0 | scipy |
| >=3.1.0 | emcee |
| >=0.9.0 | arviz |
| >=0.7.0 | findiff |
| >=1.10 | torch |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl cofi-0.1.3.dev2:
pip install cofi-0.1.3.dev2.whl
نصب پکیج tar.gz cofi-0.1.3.dev2:
pip install cofi-0.1.3.dev2.tar.gz