Skip to content

BetaPrime ln_pp should depend on data #20

@cscherrer

Description

@cscherrer

Currently in betaprime.rs we have

    fn ln_pp_cache(
        &self,
        data: &DataOrSuffStat<usize, StickBreakingDiscrete>,
    ) -> Self::PpCache {
        let post = self.posterior(data);
        post.alpha / post.beta
    }

    fn ln_pp_with_cache(&self, cache: &Self::PpCache, _y: &usize) -> f64 {
        cache.ln()
    }

Since ln_pp_with_cache doesn't depend on y, this would mean the posterior predictive is a weighted counting measure on usize, which doesn't make sense. It should be a proper distribution, summing to one.

See #14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions