You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
At the moment Distributions.Discrete.Hypergeometric.CDF has input parameter k: float. k is the number of success events and must be a non negative integer. It is missleading to expect a float at this position, only to (floor k |> int) it later.
This issue is based on the Distribution<'a,'b> interface, in which both Mean (which must be float) as well as CDF use type 'a. With the current interface it is not possible to use a CDF of type int -> float for discrete distributions.
⚠️ In addition, the current implementation is insufficient for a good usability. The general usage, which is also shown in the docs, does not return any sort of code documentation to the user. It is impossible to know which kind of CDF is implemented, especially as the FSharp.Stats CDF functions do not follow the same pattern. (Bernoulli implements P(X>=k), whereas hypergeometric implements P(X<=k)).
Describe the solution you'd like
Rework the Distribution<'a,'b> handling. I am not even sure if using a interface is the correct way, as it currently prevents correct code documentation. But it is probably best to split the type into discrete and continuous.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
At the moment
Distributions.Discrete.Hypergeometric.CDF
has input parameterk: float
.k
is the number of success events and must be a non negative integer. It is missleading to expect a float at this position, only to(floor k |> int)
it later.This issue is based on the
Distribution<'a,'b>
interface, in which bothMean
(which must be float) as well as CDF use type'a
. With the current interface it is not possible to use a CDF of typeint -> float
for discrete distributions.FSharp.Stats/src/FSharp.Stats/Distributions/Distribution.fs
Lines 5 to 14 in 262f1ac
FSharp.Stats
CDF functions do not follow the same pattern. (Bernoulli implementsP(X>=k)
, whereas hypergeometric implementsP(X<=k)
).Describe the solution you'd like
Rework the
Distribution<'a,'b>
handling. I am not even sure if using a interface is the correct way, as it currently prevents correct code documentation. But it is probably best to split the type into discrete and continuous.The text was updated successfully, but these errors were encountered: