Skip to content

Lack of useful generic common ground when working with both discrete and continuous probability distributions #1136

@charging815

Description

@charging815

I've been working with MathNet.Numerics.Distributions recently and I'm really confused by certain design decisions. When writing generic algorithms that operate on probability distributions; it's really difficult to handle both discrete and continuous cases cleanly. The lack of a common interface for querying likelihood (and some other stuff) forces silly hacks and boilerplate code. Both IDiscreteDistribution and IContinuousDistribution share a lot of methods that do the same things, so why they weren't just in IUnivariateDistribution (for querying likelihood, IDiscreteDistribution uses .Probability(int) while IContinuousDistribution uses .Density(double), what's that about?). I'm considering just forking this project and moving those shared functions to IUnivariateDistribution. Haven't properly checked out multivariate distributions yet, but they could maybe benefit from some changes too. Not sure what you guys plan for it, just dropping my experience here.

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