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:
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!
[2] wikipedia pages of each probability distribution
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)
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Beta.fs#L129
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Chi.fs#L76
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/F.fs#L103
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Gamma.fs#L166
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/LogNormal.fs#L76
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/developer/src/FSharp.Stats/Distributions/Continuous/MultivariateNormal.fs
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Normal.fs#L132
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/StudentT.fs#L78
- [ ] [StudentizedRange distribution](https://github.com/fslaborg/FSharp.Stats/blob/developer/src/FSharp.Stats/Distributions/Continuous/StudentizedRange.fs)
- [ ] [MultivariateNormal distribution](https://github.com/fslaborg/FSharp.Stats/blob/developer/src/FSharp.Stats/Distributions/Continuous/MultivariateNormal.fs)
- [ ] check for correct interval type! https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Exponential.fs#L91
- To be able to contribute to this library you'll need
- an GitHub account
- an IDE like Visual Studio Community or Visual Studio Code
- [dotnet 6 sdk](https://dotnet.microsoft.com/en-us/download)
- to build the binaries yourself follow the [instructions](https://fslab.org/FSharp.Stats/#Installation)
- while working on the [FSharp.Stats documentation](https://fslab.org/FSharp.Stats/) (any file within https://github.com/fslaborg/FSharp.Stats/tree/developer/docs) you can navigate to the project folder with a prompt of your choice and use the command `./build watchdocs`
- unit tests can be executed via `./build runtests`
Description
The
Support
of distributions defines the range of values the parameter can take. At the moment, there is a mixture of types for theSupport
. It is either defined as tuple,Interval
, or undefined. To homogenize all distribution fields, it is required to change all tuple supports toInterval<float>
orInterval<int>
like it is done here:https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Discrete/Binomial.fs#L120-L122
Please check the validity of each existing distribution-support and create the appropriate Interval that either is of type
Interval<float>
orInterval<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
(a,b)
to eitherInterval.CreateClosed(a,b)
orInterval.CreateLeftOpen(a,b)
Hints (click to expand if you need additional pointers)
- [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Beta.fs#L129 - [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Chi.fs#L76 - [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/F.fs#L103 - [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Gamma.fs#L166 - [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/LogNormal.fs#L76 - [ ] https://github.com/fslaborg/FSharp.Stats/blob/developer/src/FSharp.Stats/Distributions/Continuous/MultivariateNormal.fs - [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Normal.fs#L132 - [ ] https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/StudentT.fs#L78 - [ ] [StudentizedRange distribution](https://github.com/fslaborg/FSharp.Stats/blob/developer/src/FSharp.Stats/Distributions/Continuous/StudentizedRange.fs) - [ ] [MultivariateNormal distribution](https://github.com/fslaborg/FSharp.Stats/blob/developer/src/FSharp.Stats/Distributions/Continuous/MultivariateNormal.fs) - [ ] check for correct interval type! https://github.com/fslaborg/FSharp.Stats/blob/8fb5d6dd07ff213a4e91b618fb2e654bc6147985/src/FSharp.Stats/Distributions/Continuous/Exponential.fs#L91 - To be able to contribute to this library you'll need - an GitHub account - an IDE like Visual Studio Community or Visual Studio Code - [dotnet 6 sdk](https://dotnet.microsoft.com/en-us/download) - to build the binaries yourself follow the [instructions](https://fslab.org/FSharp.Stats/#Installation) - while working on the [FSharp.Stats documentation](https://fslab.org/FSharp.Stats/) (any file within https://github.com/fslaborg/FSharp.Stats/tree/developer/docs) you can navigate to the project folder with a prompt of your choice and use the command `./build watchdocs` - unit tests can be executed via `./build runtests`