CosmoFit.FitResult

class CosmoFit.FitResult(model, datasets=<factory>, free_params=<factory>, best_fit=None, mcmc=None)[source]

Bases: object

Everything a finished (or in-progress) fit produced, in one object: which model/datasets/parameters it is, the best-fit point (if best_fit() was called), and the MCMC posterior (if run_mcmc() was called).

Built on demand by Fitter.result – it is a read-only snapshot, not a live view, so it reflects whatever state the fitter was in when it was accessed.

Parameters:
__init__(model, datasets=<factory>, free_params=<factory>, best_fit=None, mcmc=None)
Parameters:
Return type:

None

Methods

__init__(model[, datasets, free_params, ...])

load_json(path)

save_json(path)

Serialize to JSON: model/dataset/parameter names, the best-fit point and chi2/AIC/BIC, and the MCMC posterior summary and convergence diagnostics.

to_dict()

Attributes

best_fit

mcmc

model

datasets

free_params