Skip to content

Implement logprob for all GPMs #22

@Schaechtle

Description

@Schaechtle

In ClojureCat, logprob returns a not-implemented error.

This is fixable. On the view level, event processing/normalization needs to be implemented to ensure the correct probabilities are returned for logprob with complex events (see reference implementation for the event processing here). For categorical GPMs, logprob is trivial. For the normal components, the situation is a bit more complicated. It can be implemented in two ways:

  1. Simple rejection sampling; this is going to be slow, in particular, if we combine this with calls to constrain, which currently also relies on rejection sampling (resulting in a nested loop for rejection sampling).
  2. Turning the normal-inverse gamma conjugate implementation of our normal components into t-distribution components and computing the CDF for logprob analytically. This alone will support univariate events. Combined with event processing/normalization complex events can be supported.

Because logprob repeatedly called for computing mutual information, 2. is the way to go. 1. Will be significantly quicker to implement, though.

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