GWForge.population_fisher.fit

Maximum-likelihood fits of a population model to a set of samples.

Attributes

Functions

fit_model(model, samples[, free_parameters, start, ...])

Fit a population model to samples by maximum likelihood.

compare_to(fitted, reference, names)

A plain-text table of fitted values against the values used to generate.

Module Contents

GWForge.population_fisher.fit.SIMPLEX_PARAMETERS = ('lam_0', 'lam_1')[source]
GWForge.population_fisher.fit.FIT_OPTIONS[source]
GWForge.population_fisher.fit.OUT_OF_SUPPORT_PENALTY = 100000000.0[source]
GWForge.population_fisher.fit.DEFAULT_BOUNDS[source]
GWForge.population_fisher.fit.fit_model(model, samples, free_parameters=None, start=None, bounds=None, fixed_parameters=None)[source]

Fit a population model to samples by maximum likelihood.

Parameters:
  • model (GWForge.population_fisher.base.PopulationModel)

  • samples (dict) – Event parameters to fit to. For a fiducial, these should be all injections, not just the detected ones: the population model describes the astrophysical population, and fitting to the detected subset would absorb the selection function into the hyper-parameters.

  • free_parameters (sequence of str or None) – Defaults to every hyper-parameter not in fixed_parameters.

  • start (dict or None) – Starting point. Defaults to model.fiducial.

  • bounds (dict or None) – Name to (low, high). Merged onto DEFAULT_BOUNDS.

  • fixed_parameters (dict or None)

Returns:

The fitted values, merged onto the starting point, with the keys "_success", "_message" and "_mean_log_prob" describing the optimisation.

Return type:

dict

GWForge.population_fisher.fit.compare_to(fitted, reference, names)[source]

A plain-text table of fitted values against the values used to generate.

Parameters:
  • fitted (dict)

  • reference (dict)

  • names (sequence of str)

Return type:

str