cofi.InversionResult#

class cofi.InversionResult(res: dict)[source]#

The result class of an inversion run.

You won’t need to create an object of this class by yourself. See Inversion.run for how you will get such an instance.

See also

When using sampling methods, you get a SamplingResult object, with additional analysis methods attached.

Reference Details

summary() None[source]#

Helper method that prints a summary of the inversion result to console

success: bool#

indicates status of the inversion run

Type:

bool

res: dict#

raw output from backend ineference tools

Type:

dict

back to top


class cofi.SamplingResult(res: dict)[source]#

the result class of an inversion run, when the inversion is sampling-based

This is a subclass of InversionResult, so has the full functionality of it. Additionally, you can convert a SamplingResult object into an arviz.InferenceData object so that various plotting functionalities are available from arviz.

Reference Details

to_arviz(**kwargs)[source]#

convert sampler result into an arviz.InferenceData object

Note that this method takes in keyword arguments that matches the arviz.from_<library> function. If your results are sampled from emcee, then you can pass in any keyword arguments as described in arviz.from_emcee.

Returns:

an arviz.InferenceData object converted from your sampler

Return type:

arviz.InferenceData

Raises:

NotImplementedError – when sampling result of current type (type(SamplingResult.sampler))) cannot be converted into an arviz.InferenceData

back to top