-
Notifications
You must be signed in to change notification settings - Fork 57
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
Overwrite mean and cov of distribution with parameter values if given? #82
Comments
@JonathanWenger What's you take on this? |
Maybe a more general question: What is the Depending on that I would argue that we do not actually want two different ways to specify the mean and covariance. |
I agree, the |
Yes. This should probably also throw a
The reason why there is a way to specify mygammadist = Distribution(parameters={"shape":.1, "scale": .1}, mean=0.1) The trouble with this is that if |
Ah I see. But would you still agree that, for the case of the mean parameter, where we have a "more structured" alternative (the mean method), we should not use the parameters dict? IMHO the same would hold for the "support" parameter in the Dirac distribution. There we subclass anyway and it would feel just way cleaner if we just created a member "self._support" instead of storing the argument in the parameters dict. |
I don't mind having members for the distribution parameters, but if you then don't (also) store them in the dict, that is pretty inconsistent with the super class definition,i.e. if a user reads the docs of |
One approach would be to remove the However it would still be nice to offer a function of the form: def get_parameters(self):
return self._param1, self._param2 |
I like that proposal. However, I would not get rid of the |
Okay so one can construct a def get_parameters(self):
return self._parameters
|
I feel like the
self._mean
should be overriden withself._mean = lambda: parameters["mean"] if "mean" in parameters else mean
.probnum/src/probnum/prob/distributions/distribution.py
Lines 65 to 75 in f13f26c
The text was updated successfully, but these errors were encountered: