Skip to content

[feature request] Generic fallback for non-supported distributions ? #67

@lrnv

Description

@lrnv

It would be neat if there was a generic fallback for non-supported distributions. I can come up with a simple solution for continuous distributions:

# fallback for UnivariateContinuousDistribution
import Cubature
pcubature(x * Distributions.pdf(X,x), minimum(X), maximum(X))

but i need to think a bit more for discrete infinite supports.

Edit: There is ageneric fallback in Distributions.jl implemented there: https://github.com/JuliaStats/Distributions.jl/blob/master/src/functionals.jl

So maybe this is just an interface issue, Expectations.jl should not throw when it does not know the distribution but simply use the Distributions.jl one. Thanks @devmotion for the link.

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