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
Refactor TSF classifier into TSF regressor #693
Refactor TSF classifier into TSF regressor #693
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Todo:
After this, will focus on rebasing to bring the branch in sync with master. |
Hey, so first step from here should be to rebase over origin/master or upstream/master, so its possible to see the commit you did, bc all the commits make it hard to find your code. Good on putting up a PR |
81fbea1
to
3ac1387
Compare
Not all tests are passing, we are playing around with sklearn's API for now. |
Hi @luiszugasti instead of changing the file in the classification module, copy the code to a new file |
3ac1387
to
7e3e231
Compare
You still need to undo the changes in the classification module, reverting that commit or overwriting it with the version on master should do it. |
Noted. I made a mistake using git so I reset the HEAD~ in one of my commits where I undid the changes. |
Just pushing that for now, am taking a look at specific implementation requirements |
Ok so I refactored common functionality to base class. I allowed for some methods that had little/no coupling to be concrete in the base class, but this can always be reimplemented. In terms of other work, I think the remaining is testing the API for the new classifier, although I think that will be manageable after we discuss in our next meeting. Apart from that let us know what others we can refactor, @mloning I notice for example _ensemble.py can have a similar structure to this. Hope that the Base*class methodology is acceptable if not look forward to your feedback. |
Looks great @kanand77 and @luiszugasti - please mark this PR "ready for review" once you think it's good to go. There's a simple error now - I think because of the renaming with "classifier", searching and replacing all instances should fix that:
|
@mloning I'd like your input on something I uncovered. I propose one solution: scrap the new name that we chose of "TimeSeriesForestClassifier" and name it something more representative of its use - it's used as a HIVE-COTE component so might as well call it TimeSeriesForestClassifierHiveCote. I'm pretty sure that shouldn't have a negative effect since we renamed this current usage elsewhere in the tests. Anyways; I'm going to keep working on writing an API test for this. |
@@ -13,7 +13,7 @@ | |||
from joblib import delayed | |||
from sklearn.base import clone | |||
from sklearn.ensemble._forest import ForestClassifier |
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.
seems like this commit should be removed as this change is reverted in the next commit... unless im missing something..
Thanks @luiszugasti - as discussed, looks all good, I'll give it a closer look when I have some more time and take care of the naming conflict of having two |
Sounds good @mloning ! Look forward to the outcome. |
I've not forgotten about this, just was really busy over the last few days! |
No worries @mloning. Not a blocker on my side! |
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.
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.
so we are moving to having estimators/classification/regression packages? What goes in estimators as opposed to classification/regression? It should be estimation surely, since @mloning does not like classifiers and regressors?
edit: misread it, seems estimators is in series_as_features and this was already in. I think the naming point still stands? We are against nouns for packages?
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.
all looks good to me
…lowship/sktime into origin/refactor_for_#212
@mloning looks like merging is blocked, do you want us to add any more work on our side |
@luiszugasti @kanand77 @uhbuhb now merged - thanks for working on this! 🎉 |
Reference Issues/PRs
Working on issue #212. Following through with discussion with Ori and Marcus from this Monday, February 18th.
What does this implement/fix? Explain your changes.
Mostly focusing on translating TimeSeriesForest classifier into a regressor.
Does your contribution introduce a new dependency? If yes, which one?
Not yet.
What should a reviewer concentrate their feedback on?
Incremental code improvements.
Any other comments?
None yet.
PR checklist
For all contributions
For
new estimatorsexisting estimators: