-
Notifications
You must be signed in to change notification settings - Fork 240
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
Expand parameter checks to include member set. #374
Comments
In addition, would there be a simple enough way to define the limits of a support variable in terms of a parameter. In the Multivariate Hypergeometric distribution k ∈ [0,K]. I guess the constructor could create the ‘constant’. |
I like the idea. I'm not sure that we can't already do this though. Right now the limits check is a bounds check, high and low. If you have an The use case I see that we cannot currently do is for some multivariate distribution like Hypergeometric where the constructor parameter is an array of an unspecified number of values. The PHP type system fails to help in this instance, although there are tricks you can do with the First steps: What is and isn't currently possible. What would we like to do. Then there is enough information to consider implementation options. |
You’re right about type hints on the ‘standard’ distributions. This popped in my head when looking at the Multivariate Hypergeometric, where I had to put in a bunch of |
All the multivariate distributions seem to take in an array of parameters. It'd be nice to have a standard self-documenting mechanism for validating these like the univariate ones. And whatever the solution is, it could probably be generalized so it works with the univariate distributions as well. |
Since we have both discrete and continuous distributions, where parameters can be members of the integer set, natural numbers, or real numbers, it would be nice to be able to specify this the same way we specify parameter limits. I propose that we make the parameter definition an array, and the second element can be the member set. We could even have fun with it and use the standard characters of ℕ, ℝ, and ℤ.
The text was updated successfully, but these errors were encountered: