-
Notifications
You must be signed in to change notification settings - Fork 422
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
Allow Categorical to have different bounds then 1, ncategories? #449
Comments
This is pretty much exactly the use case for location-scale families, which people are already working on. |
Ah thanks I see. For what I want to do, I would prefer a discrete version of UnivariateLocationScaleFamily. E.g. if the math preserves discreteness (sum, max...) the code should also. Also iterating constructions is much cleaner if the type does not forget discreteness along the way. |
Yes, it's totally reasonable. I think one of the essential things we have to get right is making location and scale families respect discreteness when appropriate. |
So we should actually have two types DiscreteUnivariateLocationScaleFamily {T <: UnivariateDistribution} <: DiscreteUnivariateDistribution (maybe the first type is parametrized by discrete T only.) And respect discreteness when it can be proven by type reasoning? e.g. Binomial + 1 discrete (because discrete + int is always discrete) |
Another option is to pass two parameters to
will generate |
+1; I've got an application that would work great with |
Related to #634 |
I would consider this closed with #634 then |
How about adding an additional field to the Categorical type with default value 1. What I have in mind is a field Categorical.min such that
There would probably be several benefits, let me just describe the one that motivates me.
What I want to do is create new distributions out of old ones. For example
In some cases (e.g. add two binomial same p) one can do so analytically, but more often then not I end up with a distribution which has no better description then a value range and a probability vector.
But this distribution is may not be Categorical because it can assume 0 or even negative values!
I feel it would be awkward to introduce a new type for this kind of thing and would love to use Categorical instead.
The text was updated successfully, but these errors were encountered: