gwpopulation_pipe.data_analysis.scale_evidences_by_cut
- scale_evidences_by_cut(result, likelihood, hyper_prior, N_samples=3000)[source]
Scale the evidence calculated by dynesty by the fraction of prior samples retained after convergence cuts. Dynesty calculates the evidence with respect to the prior that has nonzero likelihood support, effectively renormalizing the prior. A major cause of zero likelihood support is the convergence cuts applied.
This function scales the evidence by the fraction of prior samples that have nonzero likelihood support to undo this renormalization. The field log_evidence_scaled is added to the result to represent the evidence with respect to the prior supplied by the user, whereas result.log_evidence is the evidence directly from dynesty, which is the evidence with respect to the prior with nonzero likelihood support.
- Parameters:
- result: bilby.core.result.Result
The result object containing the evidence to be scaled.
- likelihood: gwpopulation.hyperpe.HyperparameterLikelihood
The likelihood object used in the analysis.
- hyper_prior: bilby.core.prior.PriorDict
The prior used in the analysis.
- N_samples: int
The number of samples to draw from the prior to estimate the fraction of prior samples retained after convergence cuts.
- Returns:
- None