Skip to content
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] Adapt rocket classifiers to return numpy arrays instead of data frames #209

Merged
merged 32 commits into from Apr 5, 2023

Conversation

TonyBagnall
Copy link
Contributor

@TonyBagnall TonyBagnall commented Mar 17, 2023

currently, all rocket transforms are converted into pandas before return in transform, despite all operations being performed on numpy. This PR switches all the rocket variants to return numpy arrays in transform. The classifiers that use these transforms then just convert it back to numpy. It is much more natural to just not use pandas at all. There are two stages

  1. Stop the conversion in transform (remove pd.DataFrame(X_)
  2. Stop the automatic conversion in the base class ( super(Rocket, self).init(_output_convert=False))

This PR is part of #208. Note I have left the unequal length version for now. For a bonus 10 pts, I will also

  1. speed up the tests prior to merging. they currently take 2 mins locally for 6 rocket tests (even after numba build)
  2. extend the docstring for rocket, which was a bit terse.

I have reverted the MultiRocket because the base class conversions are breaking it with 2D numpy. It breaks them all, but it makes MultiRocket fail tests. We can wait to do this until after we have resolved the conversion problem.

@TonyBagnall TonyBagnall added the transformations Transformations package label Mar 17, 2023
@TonyBagnall TonyBagnall changed the title Ajb/rocket [ENH] Adapt rocket classifiers to return numpy arrays not pandas Mar 17, 2023
@TonyBagnall TonyBagnall changed the title [ENH] Adapt rocket classifiers to return numpy arrays not pandas [ENH] Adapt rocket classifiers to return numpy arrays instead of data frames Mar 17, 2023
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

setup.cfg Outdated Show resolved Hide resolved
@MatthewMiddlehurst MatthewMiddlehurst merged commit d1b1962 into main Apr 5, 2023
14 checks passed
@MatthewMiddlehurst MatthewMiddlehurst deleted the ajb/rocket branch April 5, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transformations Transformations package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants