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, CoFI provides an interface across a wide range of inference algorithms from different sources, underpinned by a rich set of domain relevant examples.
This project and documentation are under initial development stage. Please feel free to contact us for feedback or issues!
Installation
From PyPI:
$ pip install cofi
Or alternatively, from conda-forge:
$ conda install -c conda-forge cofi
Check CoFI documentation - installation page for details on dependencies and setting up with virtual environments.
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)
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:
inv_problem.suggest_tools() # a tree will be printed
Run an inversion with these lines:
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 and tutorial pages for more real-world or advanced use cases.
Contributing
Interested in contributing? Please check out our contributor's guide.
Licence
This project is distributed under a 2-clause BSD licence. A copy of this licence is provided with distributions of the software.
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 cofi-0.1.3.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 354776ad9c4146c9a7b6ef605575b215223b3480795678ef6c6fdd0e356083e8 |
|
MD5 | 3c06689f342b7ab49e17c4e23d0c6aba |
|
BLAKE2b-256 | f11ef3e2cf1b15b7bb2e2c7baf4c76995bf2c413108c4ecab09e9988ca6bf4f5 |