Welcome to CoFI!#
Welcome to the CoFI Documentation! CoFI, the Common Framework for Inference, is an open-source tool that bridges the gap between domain expertise and inference, within and beyond the field of geoscience.
Whether youโre a student, an educator, or an industry professional, CoFI is your go-to tool. It simplifies the process of applying inference techniques, allowing for a wide range of applications from academic research and teaching to solving real-world geoscience problems in the industry. With its user-friendly, flexible and accessible interface, CoFI empowers you to focus on what truly matters - the science.
1# CoFI API has flexible ways of defining an inversion problem. For instance:
2import cofi
3
4inv_problem = cofi.BaseProblem()
5inv_problem.set_objective(my_objective_func)
6inv_problem.set_initial_model(my_starting_point)
7
8# Once a problem is defined, `cofi` can tell you what inference tools you can
9# use based on what level of information you've provided:
10inv_problem.suggest_tools() # a tree will be printed
11
12# Run an inversion with these lines:
13inv_options = cofi.InversionOptions()
14inv_options.set_tool("torch.optim")
15inv_options.set_params(options={"num_iterations": 50, "algorithm": "Adam"})
16
17inv = cofi.Inversion(inv_problem, inv_options)
18result = inv.run()
19print(result.success)
20print(result.model)
If this looks useful, letโs get started!
โ๏ธ Installation
Get a CoFI from here
๐ Tutorials
Step-by-step guide on how to use CoFI
๐๏ธ Examples
Adapt a real-world application to your needs
๐ API Reference
Dive into the details
๐๏ธ Development
Report issues or contribute with your code
๐ฌ Have questions?
Accept this invitation to join the conversation on Slack
CoFI is currently supported and coordinated by InLab.