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
Hashes for cofi-0.1.1.dev3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ec45409bdfeb6becb1dc2937f620b423cef48208e945c670863b06a29d530b7 |
|
MD5 | d7df6370edc79803ec2a29f58b1e9244 |
|
BLAKE2b-256 | 788539ddd3f0e384c7d76949d2fc44de757f1a94572b5a2d46cbf7b7302f0c76 |
Hashes for cofi-0.1.1.dev3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de04dca7e9298f31c04e35d59d554fb97cca7e615f2fc51693e5f3337da5a9b1 |
|
MD5 | 9e2e7e7dd8c7071c40dd10864b814f86 |
|
BLAKE2b-256 | f06f7a731c7c80281ed90137fe0248f163fb117efe73eb669d8279111b6eff1b |
Hashes for cofi-0.1.1.dev3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 988bcb3f3749f1356c257c289ca5a1cf61336f2fc34dc6577ce6ca451c13b439 |
|
MD5 | 041fdd60d06e2928aa9433484f668a12 |
|
BLAKE2b-256 | b24640aed4705088caa72c6aa455dbc67520681c627e2771440f4625f942dc0a |
Hashes for cofi-0.1.1.dev3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db998f19a6a6cf48ae7816e28d8a25ac20328d66a67279b32d18e5a09a6edba9 |
|
MD5 | 83217900355608355ec96f8b9c4a564e |
|
BLAKE2b-256 | ed8398b6739c62f6af3bae9bea683997a9a47f98d488f63b03c5c68e559e8fe4 |
Hashes for cofi-0.1.1.dev3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70c17b2fd19e2f4e8a9e9d23837c1ff9a84d2335dd09059aece5e324887c1f61 |
|
MD5 | 97d8c94588b1effc77c4000e581fa760 |
|
BLAKE2b-256 | c39ef3756854e98d77c8bdacd1af568bc230d8ca42fa625cd941d346b8b01b4c |
Hashes for cofi-0.1.1.dev3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee298378ff858669f10a162d5ebcfc8236d4dc56225a85b2ed864faa79605a2c |
|
MD5 | 864445274e7c3534fac740a4157f2ab5 |
|
BLAKE2b-256 | 6bc3b4660abdd4e8517fd482139705644d63925f7491d8d45692e7cd3a073ac1 |
Hashes for cofi-0.1.1.dev3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9facb8336e59a9172cbd9f13033125f52b9865191ba8d7daf428b484e153e49 |
|
MD5 | 765466a8ba5f2ec1e1f772cc66598298 |
|
BLAKE2b-256 | b7d5d6b684a4bc477f9f86b7137868dd6cff24361c911eb3c97c689468115767 |
Hashes for cofi-0.1.1.dev3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4bcb3ade23de44a87c8da39d76c6c7cfa4fb9f0d9faa0e873338950cbc4eb5b |
|
MD5 | b728f1219c077a1aaea7eb1997a056f3 |
|
BLAKE2b-256 | 219d9f8e42d72b743378bbcddea586af9e096e58697fa99d71a74de45d52d7ce |
Hashes for cofi-0.1.1.dev3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ca10134b64ac1db098777e31b4eef3f926f7b7e0a42cadf318ce5c3477f23c2 |
|
MD5 | c986f701afda78b2e77ac1cf27ff1e90 |
|
BLAKE2b-256 | a3dadfbc164556f09433588102ca6a6059a8369c1aa34ce641833f21db71fa27 |