Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Support member for all probability distributions #292

Closed
11 tasks
bvenn opened this issue Sep 20, 2023 · 2 comments · Fixed by #301
Closed
11 tasks

Update Support member for all probability distributions #292

bvenn opened this issue Sep 20, 2023 · 2 comments · Fixed by #301
Labels
Difficulty: Beginner Hackathon projects with beginner difficulty FsLab Hackathon 2023 Implementation projects for the 2023 FsLab Hackathon

Comments

@bvenn
Copy link
Member

bvenn commented Sep 20, 2023

Description

The syntax for the static member Support [within distributions] are written in a different syntax.
@Freymaurer in #222

The Support of distributions defines the range of values the parameter can take. At the moment, there is a mixture of types for the Support. It is either defined as tuple, Interval, or undefined. To homogenize all distribution fields, it is required to change all tuple supports to Interval<float> or Interval<int> like it is done here:

static member Support p n =
Binomial.CheckParam p n
Interval.CreateClosed<int> (0,n)

Please check the validity of each existing distribution-support and create the appropriate Interval that either is of type Interval<float> or Interval<int> for discrete distributions. The Wikipedia pages for probability distributions are a great source to verify the correct support (e.g. on the right side of Chi squared distribution).

There may be distributions where no support can be defined or it is not clear on first sight. Please comment these cases here!

References

Pointers

  • Interval types:
    open FSharp.Stats
    Interval.CreateClosed(2.,3.)    // corresponds to [2.0,3.0] 2 and 3 are included
    Interval.CreateOpen(2.,3.)      // corresponds to (2.0,3.0) 2 and 3 are excluded
    Interval.CreateLeftOpen(2.,3.)  // corresponds to (2.0,3.0] 2 is excluded, 3 is included
    Interval.CreateRightOpen(2.,3.) // corresponds to [2.0,3.0) 2 is included, 3 is excluded
  • suggested workflow:
    • find a distribution where the support field is missing or is of type (a,b). A list is given below!
    • research the correct support for the distribution and compare it with the existing one
    • update (a,b) to either Interval.CreateClosed(a,b) or Interval.CreateLeftOpen(a,b)
Hints (click to expand if you need additional pointers)
@bvenn bvenn added Difficulty: Beginner Hackathon projects with beginner difficulty FsLab Hackathon 2023 Implementation projects for the 2023 FsLab Hackathon Status: Available labels Sep 20, 2023
@kMutagene kMutagene moved this to Status: Available in FsLab Hackathon 2023 Sep 20, 2023
@valbers
Copy link

valbers commented Sep 30, 2023

I'm going to take a look at that.

@valbers
Copy link

valbers commented Sep 30, 2023

--> #301

@bvenn bvenn moved this from Status: In Progress to Status: Completed in FsLab Hackathon 2023 Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Beginner Hackathon projects with beginner difficulty FsLab Hackathon 2023 Implementation projects for the 2023 FsLab Hackathon
Projects
Status: Status: Completed
2 participants