CosmoFit.FitResult¶
- class CosmoFit.FitResult(model, datasets=<factory>, free_params=<factory>, best_fit=None, mcmc=None)[source]¶
Bases:
objectEverything 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 (ifrun_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:
model (str)
datasets (list)
free_params (list)
best_fit (BestFitResult | None)
mcmc (MCMCResult | None)
- __init__(model, datasets=<factory>, free_params=<factory>, best_fit=None, mcmc=None)¶
- Parameters:
model (str)
datasets (list)
free_params (list)
best_fit (BestFitResult | None)
mcmc (MCMCResult | None)
- 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_fitmcmcmodeldatasetsfree_params