DwelltimeProfiles

lumicks.pylake.population.dwelltime.DwelltimeProfiles

class DwelltimeProfiles(model: lumicks.pylake.population.dwelltime.DwelltimeModel, profiles: Dict[str, lumicks.pylake.fitting.profile_likelihood.ProfileLikelihood1D])

Profile likelihoods for a dwelltime model.

Important

This class should be initialized using lk.DwelltimeModel.profile_likelihood() and should not be constructed manually.

Warning

This is early access alpha functionality. While usable, this has not yet been tested in a large number of different scenarios. The API can still be subject to change without any prior deprecation notice! If you use this functionality keep a close eye on the changelog for any changes that may affect your analysis.

model

Model used to estimate profile likelihoods.

Type

DwelltimeModel

profiles

Dictionary of parameters with associated profiles.

Type

dict of ProfileLikelihood1D

get_interval(key, component, alpha=None)

Calculate confidence interval for a particular parameter.

Parameters
  • key ({'amplitude', 'lifetime'}) – Name of the parameter to be analyzed

  • component (int) – Index of the component to be analyzed

  • alpha (float, optional) – Significance level. Confidence intervals are calculated as 100 * (1 - alpha)%.

Returns

  • lower_bound (float, optional) – Lower bound of the confidence interval.

  • upper_bound (float, optional) – Upper bound of the confidence interval. If a bound cannot be determined (either due to an insufficient number of steps or lack of information in the data, the bound is given as None).

plot(alpha=None)

Plot the profile likelihoods for the parameters of a model.

Confidence interval is indicated by the region where the profile crosses the chi squared threshold.

Parameters

alpha (float, optional) – Significance level. Confidence intervals are calculated as 100 * (1 - alpha)%. The default value of None results in using the significance level applied when profiling (default: 0.05).

property n_components

Number of components in the model.