subsample_high_lnprob
- ssapy.utils.subsample_high_lnprob(chain, lnprob, lnprior, nSample, thresh=-10)[source][source]
Select MCMC samples with probabilities above some relative threshold
- Parameters:
chain (array_like, (nWalker, nStep, 6)) – Input MCMC chain from EmceeSampler.sample()
lnprob (array_like, (nWalker, nStep)) – Input MCMC lnprob from EmceeSampler.sample()
lnprior (array_like, (nWalker, nStep)) – Input MCMC lnprior from EmceeSampler.sample()
nSample (int) – Number of samples to return. If fewer than nSample samples exceed threshold, then return the nSample most probable samples.
thresh (float, optional) – Threshold w.r.t. max(lnprob) below which to exclude samples.
- Returns:
samples – Output samples
- Return type:
array_like, (nSample, 6)