filter_gibbs_samples function

Filter Gibbs samples