Skip to content

[Feature Request] Add univariant distributions with numerical normalizationΒ #1973

@mmikhasenko

Description

@mmikhasenko

I have a package
https://github.com/mmikhasenko/NumericalDistributions.jl
that defines the Distributions.jl interfaces for a distribution given by an unnormalized function.

See discourse post

I'd be happy to merge it into Distributions.jl.
What are opinions, requirements? - Looking for volunteers to review PR if we agree.

How it works now in NumericalDistributions.jl:

  • QuadGK for normalization, integral is stored in a struct. Btw: works for forward diff
  • sampling is done by inverting CDF numerically. It's quite fast with findfirst. Pre-computation of CDF is not done in constructor, but moved to rand.
  • methods mean, std, quantile are not implemented, but would be easy to add with the same QuadGK.

ping @ararslan to follow up on slack discussion.

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