Skip to content

Negative sigma in Normal distribution allowed #446

Description

@danielandresarcones

Describe the bug
Normal distribution requires sigma>0, but that is not enforced and does not catch unexpected behaviours (i.e. negative sigma is accepted and then just squared internally for variance computations). This is relevant if the sigma is not defined a priori but obtained algorithmically, such as in hierarchical approaches.

To Reproduce
Normal(0, -1)

Expected behavior
An error or warning should be thrown.

Additional context
This is relatively minor. Feel free to delete if the user is the one expected to check for positivity. The documentation of the class already specifies it. Other distributions could benefit for the same treatment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions