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] remove private methods from parameters of ProximityForest
, ProximityTree
, and ProximityStump
#6046
Conversation
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.
Nice, thanks!
I was wondering, there are a lot of functions which just dispatch to a function. Should these be moved into the class, or otherwise simplified? (to discuss, not necessarily to action)
The docstring example of You can also check the estimator by running tests using |
Well, I think moving these functions to classes would make code more cohesive and enforce readability and maintainability even if it will be achieved at the cost of duplicating some functions here 🙄 |
What about moving the entire body to the class then? |
Yeah if you agree with it I can start away with it on this PR |
if you agree that´s a good idea, of course. If not, please explain and advise. |
…mityStump` moved all function logic to the body and simplified the logic of the functions that were dispatching to other function. Removed redundant logics and tested locally tests are passing
I agree with it and working on it will push a commit that adds these changes |
Closes sktime#6035 This PR tries to show more reliable coverage badge on README using carryforward flag feature for `complete`. Ref. https://docs.codecov.com/docs/carryforward-flags
Reverts sktime#6041 After the merge, the badge now appears broken and the URL showed no image.
sktime#6038) #### Reference Issues/PRs Part of sktime#3351. See also sktime#3365 #### What does this implement/fix? Explain your changes. Migrated CNTC, InceptionTime, and MACNN regressors to sktime from sktime-dl
@ivarzap forgot to add author credits in sktime#5942, fixed.
Fixes various minor typos: * docstring typos * author credits: `model_evaluation` was missing credits of @hazrulakmal; module `__init__` should have no authors variable
…ion templates (sktime#6053) This PR adds further clarification regarding immutability of `self`-params in the extension templates, including recipes on handling defaults and estimators (the latter only in "non-simple" extension templates).
Sktime already has an adapter for `neuralforecast` which only implements `RNN` model. RNN's suffer from problems like gradient vanishing while training, So I it's good to have LSTM model implemented that works better than RNN for time-series forecasting. Here is a demo of LSTM implemented in sktime using neuralforecast [notebook](https://colab.research.google.com/drive/1R9z5HS4uRpzVuVYKMHoB-q3-osWgHyD_?usp=sharing) --------- Co-authored-by: Anirban Ray <39331844+yarnabrina@users.noreply.github.com>
Hey @fkiraly |
@fnhirwa, the failures are related to the classes you changed, and they are not present on My gut feeling would be that there might be a small mistake somewhere, e.g., a default value that is different from prior state. I would advise that you isolate a piece of self-contained code that replicates the error, perhaps a few lines; perhaps using Let us know if you need help, e.g., a demo of how this kind of debugging works. |
I completely understand that and going to deep dive to find the issue and will push a fix soon🤞 |
@fkiraly the CI tests seems to pass now would like a review from you. |
Sure! Will start remote CI and then review. |
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.
Looks good to me! Refactor points seem correctly moved.
Left some comments regarding docstrings, these are not blocking though.
Test failures are unrelated, see #6094
… functions to docstrings
Just made the requested changes to docstrings and made the |
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.
Thanks!
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.
(still approve)
Reference Issues/PRs
Fixes #5042
What does this implement/fix? Explain your changes.
Removed methods that were being instantiated with the objects of
ProximityForest
,ProximityTree
, andProximityStump
classes and made them the class methods.For the
get_gain
method which defaults togini_gain
I added a dictionary to track the gain functions in case there is more gain functions added in the future.Methods changed
setup_distance_measure
get_exemplars
get_distance_measure
find_stump
get_gain
Does your contribution introduce a new dependency? If yes, which one?
What should a reviewer concentrate their feedback on?
Whether the refactor logic is well versed
Did you add any tests for the change?
No tests added
Any other comments?
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
sktime
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
See here for further details on the algorithm maintainer role.
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.