Skip to content

BCConstantPrior range #184

Open
Open

Description

@greenwald

Should BCConstantPrior enforce that a range be provided? Currently it just returns a constant value regardless of the parameter. Since a constant prior can only truly be defined for a finite region, we should perhaps have lower and upper limits and return -inf for the log prior if the parameter is outside the range.

Activity

  1. fredRos commented on Oct 11, 2016

    @fredRos
    Contributor

    It makes sense to me to define the range. Can you provide a little snippet where the range would help? I'm positive to making this change and we can probably do this automatically in the background for SetPriorConstant because we know the ranges.

    A clear separation between BCParameter, the range, and the BCPrior becomes blurred, unfortunately :(

  2. greenwald commented on Oct 11, 2016

    @greenwald
    ContributorAuthor

    This blurring already exists, since BCConstantPrior at the moment has two constructors: one which takes the upper and lower limits and one which takes the range size. Both are used merely to store 1/range-size in the class. It would be a minor change to also store the actual limits---it would mean removing the constructor that takes the range size, though. (I do not think it's actually necessary or even used.)

    Not a snippet, but an example: BCPrior's need not only be used in the automatic way BAT uses them. I use them such for complex parameters:

    1. Define parameters for real an imaginary components of my complex parameter.
    2. Define BCPrior's (in my case BCConstantPrior) for the abs and arg of the complex parameter
    3. In LogAPrioriPrior, call the BCPrior objects with the abs and arg of my complex parameter.

    Since at the moment the only range checking happens in BCEngineMCMC, the range checking is only applied to the real and imaginary components, not to the abs and arg.

  3. greenwald commented on Oct 11, 2016

    @greenwald
    ContributorAuthor

    Also, it would be a step in the right direction, since for a future release (perhaps BAT 1.1), I would like to remove parameter ranges and have them entirely dictated by the priors.

  4. added this to the 1.1 milestone on Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions