Common Framework for Inference
Project description
CoFI (Common Framework for Inference)
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, this Python package provides an interface across a wide range of inference algorithms from different sources, as well as ways of defining inverse problems with examples included.
This project and documentation are under initial development stage. Please feel free to contact us for feedback or issues!
Installation
It's optional, but recommended to use a virtual environment:
conda create -n cofi_env python=3.8 scipy
conda activate cofi_env
Install cofi with:
pip install cofi
Basic Usage
CoFI API has flexible ways of defining an inversion problem. For instance:
from cofi import BaseProblem
inv_problem = BaseProblem()
inv_problem.set_objective(my_objective_func)
We have a series of pre-defined problems and ways of setting up the problem. Feel free to check out our getting-started page on how to plug in your own inference problems (with different tiers of flexibility)
Once a problem is defined, cofi can tell you what inference solvers you can use based on what level of
information you've provided:
inv_problem.suggest_solvers() # a list will be returned
Run an inversion with these lines:
from cofi import InversionOptions, InversionRunner
inv_options = InversionOptions()
inv_options.set_method("optimisation")
inv_options.set_iteration_limit(100)
inv_runner = InversionRunner(inv_problem, inv_options)
result = inv_runner.run()
print(result.ok)
print(result.model)
And now we are done! Check out our tutorial pages for more examples and advanced usages.
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 Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cofi-0.1.1.dev3.tar.gz.
File metadata
- Download URL: cofi-0.1.1.dev3.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4d95858afb537760898f0ed62449476cc49c8cb699be7066619cfc4bda0bb8b
|
|
| MD5 |
9c8bf998b16180ab72794e8fe1fe3fa7
|
|
| BLAKE2b-256 |
71f58c44c5f3bbe573622b6be9ceea5b6a71fa66a91475755254765882aed56c
|
File details
Details for the file cofi-0.1.1.dev3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 44.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ec45409bdfeb6becb1dc2937f620b423cef48208e945c670863b06a29d530b7
|
|
| MD5 |
d7df6370edc79803ec2a29f58b1e9244
|
|
| BLAKE2b-256 |
788539ddd3f0e384c7d76949d2fc44de757f1a94572b5a2d46cbf7b7302f0c76
|
File details
Details for the file cofi-0.1.1.dev3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de04dca7e9298f31c04e35d59d554fb97cca7e615f2fc51693e5f3337da5a9b1
|
|
| MD5 |
9e2e7e7dd8c7071c40dd10864b814f86
|
|
| BLAKE2b-256 |
f06f7a731c7c80281ed90137fe0248f163fb117efe73eb669d8279111b6eff1b
|
File details
Details for the file cofi-0.1.1.dev3-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 64.4 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
988bcb3f3749f1356c257c289ca5a1cf61336f2fc34dc6577ce6ca451c13b439
|
|
| MD5 |
041fdd60d06e2928aa9433484f668a12
|
|
| BLAKE2b-256 |
b24640aed4705088caa72c6aa455dbc67520681c627e2771440f4625f942dc0a
|
File details
Details for the file cofi-0.1.1.dev3-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 44.2 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db998f19a6a6cf48ae7816e28d8a25ac20328d66a67279b32d18e5a09a6edba9
|
|
| MD5 |
83217900355608355ec96f8b9c4a564e
|
|
| BLAKE2b-256 |
ed8398b6739c62f6af3bae9bea683997a9a47f98d488f63b03c5c68e559e8fe4
|
File details
Details for the file cofi-0.1.1.dev3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70c17b2fd19e2f4e8a9e9d23837c1ff9a84d2335dd09059aece5e324887c1f61
|
|
| MD5 |
97d8c94588b1effc77c4000e581fa760
|
|
| BLAKE2b-256 |
c39ef3756854e98d77c8bdacd1af568bc230d8ca42fa625cd941d346b8b01b4c
|
File details
Details for the file cofi-0.1.1.dev3-cp39-cp39-macosx_10_9_x86_64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 64.3 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee298378ff858669f10a162d5ebcfc8236d4dc56225a85b2ed864faa79605a2c
|
|
| MD5 |
864445274e7c3534fac740a4157f2ab5
|
|
| BLAKE2b-256 |
6bc3b4660abdd4e8517fd482139705644d63925f7491d8d45692e7cd3a073ac1
|
File details
Details for the file cofi-0.1.1.dev3-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 44.2 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9facb8336e59a9172cbd9f13033125f52b9865191ba8d7daf428b484e153e49
|
|
| MD5 |
765466a8ba5f2ec1e1f772cc66598298
|
|
| BLAKE2b-256 |
b7d5d6b684a4bc477f9f86b7137868dd6cff24361c911eb3c97c689468115767
|
File details
Details for the file cofi-0.1.1.dev3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4bcb3ade23de44a87c8da39d76c6c7cfa4fb9f0d9faa0e873338950cbc4eb5b
|
|
| MD5 |
b728f1219c077a1aaea7eb1997a056f3
|
|
| BLAKE2b-256 |
219d9f8e42d72b743378bbcddea586af9e096e58697fa99d71a74de45d52d7ce
|
File details
Details for the file cofi-0.1.1.dev3-cp38-cp38-macosx_10_9_x86_64.whl.
File metadata
- Download URL: cofi-0.1.1.dev3-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 64.3 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca10134b64ac1db098777e31b4eef3f926f7b7e0a42cadf318ce5c3477f23c2
|
|
| MD5 |
c986f701afda78b2e77ac1cf27ff1e90
|
|
| BLAKE2b-256 |
a3dadfbc164556f09433588102ca6a6059a8369c1aa34ce641833f21db71fa27
|