GWForge.population_fisher.population_fisher_term_I

The Term-I population Fisher matrix.

Attributes

Classes

PopulationFisherResult

Everything population_fisher() computed, and how to read it.

Functions

covariance_from_fisher(fisher[, names, rcond])

Invert a Fisher matrix, falling back to a pseudo-inverse when it is singular.

population_fisher(model, events[, free_parameters, ...])

Term-I population Fisher matrix for a detected catalogue.

Module Contents

GWForge.population_fisher.population_fisher_term_I.CONDITION_NUMBER_WARNING = 100000000000000.0[source]
GWForge.population_fisher.population_fisher_term_I.DEFAULT_RCOND = 1e-12[source]
GWForge.population_fisher.population_fisher_term_I.DEGENERACY_THRESHOLD = 1e-10[source]
class GWForge.population_fisher.population_fisher_term_I.PopulationFisherResult(parameter_names, fixed_parameters, fiducial, fisher, covariance, condition_number, n_events, n_total, scores, mean_score, degenerate)[source]

Everything population_fisher() computed, and how to read it.

Variables:
  • parameter_names (list of str) – Free hyper-parameters, in matrix order.

  • fixed_parameters (dict) – Hyper-parameters held fixed, excluded from the matrix.

  • fiducial (dict) – Values the Fisher was evaluated at, free and fixed together.

  • fisher (numpy.ndarray) – (n, n) Term-I Fisher matrix.

  • covariance (numpy.ndarray) – Its inverse (or pseudo-inverse).

  • sigma (dict) – Name to one-sigma marginalised uncertainty.

  • condition_number (float)

  • n_events (int) – Events with finite scores, i.e. those that entered the sum.

  • n_total (int) – Events offered, before the support and finiteness cuts.

  • scores (numpy.ndarray) – (n_events, n) raw, uncentred scores.

  • mean_score (numpy.ndarray) – (n,); the Monte-Carlo estimate of d ln alpha / d Lambda.

  • degenerate (list of str) – Free parameters whose centred score vanished.

parameter_names[source]
fixed_parameters[source]
fiducial[source]
fisher[source]
covariance[source]
condition_number[source]
n_events[source]
n_total[source]
scores[source]
mean_score[source]
degenerate[source]
sigma[source]
classmethod from_pickle(path)[source]

Reload a forecast that bin/gwforge_population_fisher saved.

Parameters:

path (str) – A pickle written by the CLI.

Return type:

PopulationFisherResult

correlation_matrix()[source]

Correlation matrix implied by covariance.

scaled_to(n_events)[source]

This forecast rescaled to a different number of detected events.

Parameters:

n_events (int)

Return type:

PopulationFisherResult

summary()[source]

A plain-text table of the forecast.

Return type:

str

GWForge.population_fisher.population_fisher_term_I.covariance_from_fisher(fisher, names=None, rcond=DEFAULT_RCOND)[source]

Invert a Fisher matrix, falling back to a pseudo-inverse when it is singular.

Parameters:
  • fisher (numpy.ndarray)

  • names (sequence of str or None) – Used only to name parameters in the warning.

  • rcond (float)

Returns:

(covariance, condition_number).

Return type:

tuple

GWForge.population_fisher.population_fisher_term_I.population_fisher(model, events, free_parameters=None, fixed_parameters=None, parameters=None, method='auto', rcond=DEFAULT_RCOND, n_total=None)[source]

Term-I population Fisher matrix for a detected catalogue.

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

  • events (dict) – Source parameters of the detected events. They must be drawn from the population at parameters, or the centred-score identity that supplies the selection term does not hold.

  • free_parameters (sequence of str or None) – Hyper-parameters to vary. Defaults to every name the model has that is not in fixed_parameters.

  • fixed_parameters (dict or None) – Name to value, held fixed and excluded from the matrix.

  • parameters (dict or None) – Fiducial point. Defaults to model.fiducial.

  • method (str) – Passed to score().

  • rcond (float) – Pseudo-inverse threshold.

  • n_total (int or None) – Events offered before cuts, for reporting. Defaults to len(events).

Return type:

PopulationFisherResult

Raises:

ValueError – If no parameters are free, or no event has a finite score.