-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add mode to Binomial #635
Add mode to Binomial #635
Conversation
Some things to ask here:
![]()
What do you suggest @aloctavodia ? |
I am adding a mode to other Python files, and I will make a pull request. is that fine @rohanbabbar04 |
Sure, can you comment on #604 which ones are you working on so that we don't pick the same ones? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
- Coverage 82.23% 74.39% -7.85%
==========================================
Files 101 105 +4
Lines 8020 8735 +715
==========================================
- Hits 6595 6498 -97
- Misses 1425 2237 +812 ☔ View full report in Codecov by Sentry. |
Sure, you have already implemented Rice and Binomial, so I will drop this since I have already implemented it in my local setup. |
Not sure, but probably better to return a tuple if more than one mode. And as a first approach allow to fix a single mode in maxent, but handle de case that the mode method could return a tuple |
Numba vectorize doesn't support def mode(self):
y = (self.n + 1) * self.p
if (np.isin(self.p, [0, 1])) | (np.mod(y, 1) != 0):
return np.where(self.p == 1, self.n, np.floor(y))
return y, y - 1 |
Not sure what to do. Having to deal with multiple modes is quite annoying and I am not sure it is worth the effort. |
Hmm... |
How weird would be two return two modes (if they exists) only if all parameters are scalar. And return only one for vector parameters. We support vector parameters, but we mostly care of scalars |
I think the latest commit should work for both scalar and vectors(with scalar giving bimodal result in that case) |
Description
Checklist