threeML.classicMLE.goodness_of_fit module

class threeML.classicMLE.goodness_of_fit.GoodnessOfFit(joint_likelihood_instance, like_data_frame=None)[source]

Bases: object

by_mc(n_iterations=1000, continue_on_failure=False)[source]

Compute goodness of fit by generating Monte Carlo datasets and fitting the current model on them. The fraction of synthetic datasets which have a value for the likelihood larger or equal to the observed one is a measure of the goodness of fit

  • n_iterations – number of MC iterations to perform (default: 1000)

  • continue_of_failure – whether to continue in the case a fit fails (False by default)


tuple (goodness of fit, frame with all results, frame with all likelihood values)