-
Notifications
You must be signed in to change notification settings - Fork 47
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
[ENH] Histogram distribution #382
Conversation
merged #381 into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Really nice work, I like the design thinking in the new base class.
Before we merge, the current "template" pattern does not allow override of the public methods pdf
etc, or we diverge from the template pattern, see https://github.com/kamranahmedse/design-patterns-for-humans for the pattern.
Could you think of the best way to avoid the override? Or, let me know if you think this is not possible with the current design.
We do not need to merge the two base classes together btw, just avoid the override.
This reverts commit bfac335.
This reverts commit f9290590c65eb99dcf60ea36a2e6fbbbfac7f9c3.
I hope this will suffice as I am not overriding any public methods anymore. |
@fkiraly , All the checks have passed after the overriding of public methods were avoided as well. Are we waiting on something for this merge? |
@fkiraly , I modified the mean and variance to be calculated after vectorizing the These are the outputs This involved changing most of the code just for the mean and variance itself which doesn't have all the Thoughts? |
a factor of 5 or 6 is considered substantial, so I would advise we check how much time the conversion of arrays requires. I would then proceed based on the outcoe:
|
This is including the vectorization time. With 2 cases of vectorization time inclusion case 1 when it is not vectorized in init but in separate functions and case 4 when it is vectorized in init and not in separate functions.
As you can see it actually gets worse when it is vectorized in
Please do give your take based on your inference of the data. |
Hm, I would then agree that the payoff is perhaps not worth the effort at the moment. I would suggest to summarize the findings and outstanding questions in an issue, and perhaps at a later time point review together:
|
Yeah I will summarize the findings of this PR in an issue. |
Reference Issues/PRs
fixes #323
PR is a new one with updated main merged with #335 as there were some merge conflicts in
__init__.py
in distributions and alsodistributions.rst
inapi_reference
.What does this implement/fix? Explain your changes.
Implements the histogram distribution using bins and bin_mass as the parameters.
Does your contribution introduce a new dependency? If yes, which one?
No
Did you add any tests for the change?
Yes
Any comments
All the discussion regarding the Histogram discussion has been discussed in the PR #335.
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
skpro
root directory (not theCONTRIBUTORS.md
). Common badges:code
- fixing a bug, or adding code logic.doc
- writing or improving documentation or docstrings.bug
- reporting or diagnosing a bug (get this pluscode
if you also fixed the bug in the PR).maintenance
- CI, test framework, release.See here for full badge reference
For new estimators
docs/source/api_reference/taskname.rst
, follow the pattern.Examples
section.python_dependencies
tag and ensureddependency isolation, see the estimator dependencies guide.