Result

class ionworkspipeline.Result(parameter_values, optimizer_result, samples=None, costs=None, callbacks=None, callback_results=None, children=None)

A class to store the results of a ionworkspipeline.DataFit.

Parameters

parameter_valuesdict

The final values of the optimized parameters.

optimizer_resultionworkspipeline.OptimizerResult or ionworkspipeline.SamplerResult

The result object returned by the SciPy optimizer.

callbacksdict

The callbacks used during optimization.

callback_resultsdict

The results collected by callbacks during optimization.

childrendict, optional

Results from multistarted parameter estimation if applicable.

Attributes

parameter_valuesdict

The final values of the optimized parameters.

optimizer_resultionworkspipeline.OptimizerResult or ionworkspipeline.SamplerResult

The result object in the format returned by the SciPy optimizer.

callbacksdict

The callbacks used during optimization.

callback_resultsdict

The results collected by callbacks during optimization, formatted as follows:

{
    "callback_name": {
        "data": ...,
        "options": ...,
        "initial_results": {
            "inputs": ...,
            "outputs": ...,
        },
        "fit_results": {
            "inputs": ...,
            "outputs": ...,
        },
    },
    ...
}
childrendict

Results from sub-fits if this was part of a composite fit.

Notes

The specific attributes available in optimizer_result may vary depending on the optimization method used. Refer to SciPy’s documentation for a complete list of possible attributes.

Extends: builtins.dict

class ionworkspipeline.OptimizerResult(x=None)

Result of an optimization. Inherits from scipy.optimize.OptimizeResult.

This class represents the result of running an optimizer. It contains the optimal parameter values found and other optimization-related information like function evaluations, success status etc.

Parameters

xarray_like, optional

The solution of the optimization. Default is None.

Extends: scipy.optimize._optimize.OptimizeResult

class ionworkspipeline.SamplerResult(samples=None, costs=None)

Result of a sampling procedure. Inherits from scipy.optimize.OptimizeResult.

This class represents the result of running a sampler. It contains the samples drawn from the parameter space and their associated costs/objective function values.

Parameters

samplesarray_like, optional

The samples drawn from the parameter space. Default is None.

costsarray_like, optional

The cost/objective function values for each sample. Default is None.

Extends: scipy.optimize._optimize.OptimizeResult

property log_pdfs

Converts costs to log probability density values.

Returns

array_like

The negative log of the costs, representing log probability densities.

property x

Returns the sample with the lowest cost.

Since we are minimizing the cost function, this represents the best parameter values found during sampling.

Returns

array_like

The sample with the minimum cost value.