GWForge.population_fisher.population_fisher_term_I¶
The Term-I population Fisher matrix.
Attributes¶
Classes¶
Everything |
Functions¶
|
Invert a Fisher matrix, falling back to a pseudo-inverse when it is singular. |
|
Term-I population Fisher matrix for a detected catalogue. |
Module Contents¶
- GWForge.population_fisher.population_fisher_term_I.CONDITION_NUMBER_WARNING = 100000000000000.0[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 ofd ln alpha / d Lambda.degenerate (list of str) – Free parameters whose centred score vanished.
- classmethod from_pickle(path)[source]¶
Reload a forecast that
bin/gwforge_population_fishersaved.- Parameters:
path (str) – A pickle written by the CLI.
- Return type:
- correlation_matrix()[source]¶
Correlation matrix implied by
covariance.
- 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:
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:
- Raises:
ValueError – If no parameters are free, or no event has a finite score.