Back to TotalFit Methods

Randomization for Monte-Carlo

In a default setting the random noise in all X and Y values is considered to be UNCORRELATED. The ideal dataset is calculated and perturbed for Monte-Carlo fitting runs. If the noise in your model is correlated, a specialized randomizer function should be provided. Randomizer functions are placed in +monte_carlo_functions package. Handle to a randomizer is assigned to 'randomizer' field.

Irrespective of how the data is to be randomized, the fit() method initially fits the experimental data to obtain best-fit parameters using fit_only() method. Then it computes ideal values of the function (Y values). Then it performs a sequence of fitting runs every time perturbing Y and X data using a function assigned to self.randomizer. The collection of best-fit parameters from these Monte-Carlo simulations are shown as correlation plots between parameters and used for determining confidence intervals (by taking the specified percentiles of the distribution of values of each parameter).

See monitoring_fitting_progress for discussion of how to tell whether your randomization procedure is adequately representing experimental errors.

IMPORTANT NOTE: For accuracy of the procedure IT IS CRITICAL to make sure THE MODEL FITS THE DATA WELL! If there is large discrepancy between model and the data in any of the datasets - that need to be addressed by changing the model, adjusting data and so on, and only after that Monte-Carlo analysis may be applied.


For a specific usage see TotalFit.m