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

[BUG] plot_cluster_algorithm: fix error "predict_series is undefined" if X is passed as np.ndarray #3933

Merged
merged 4 commits into from
Dec 26, 2022

Conversation

hakim89
Copy link
Contributor

@hakim89 hakim89 commented Dec 14, 2022

Reference Issues/PRs: N/A

What does this implement/fix? Explain your changes.

currently plot_cluster_algorithm function in sktime/clustering/utils/plotting/_plot_partitions.py throws an error if X is passed as a numpy array in the function. Error is because predict_series is undefined

Does your contribution introduce a new dependency? If yes, which one? No

What should a reviewer concentrate their feedback on?

Any other comments?

PR checklist

For all contributions
  • I've added myself to the list of contributors.
  • Optionally, I've updated sktime's CODEOWNERS to receive notifications about future changes to these files.
  • I've added unit tests and made sure they pass locally.
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG] indicating whether the PR topic is related to enhancement, maintenance, documentation, or bug.
For new estimators
  • I've added the estimator to the online documentation.
  • I've updated the existing example notebooks or provided a new one to showcase how my estimator works.

@miraep8
Copy link
Collaborator

miraep8 commented Dec 14, 2022

Hey @hakim89, this looks like a reasonable bug change to me 👍 Thanks for spotting it.

Regarding the linting failure - the easiest way to fix it (and make sure you don't run into future issues in sktime contributions) would be to install our pre-commit. Instructions for how to do that here. Ping me if you run into any issues though! :)

Cheers!

@hakim89
Copy link
Contributor Author

hakim89 commented Dec 17, 2022

Thank you @miraep8. I ran pre-commit locally and pushed the white-space changes. Hopefully I did it correctly (first time contributing ). That same file (and few functions in it) might need some optimization and I might push more changes soon. Currently it fails silently to draw timeseries data into centers if the number is large.

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, @hakim89!

@fkiraly
Copy link
Collaborator

fkiraly commented Dec 26, 2022

Feel free to add yourself as a contributor to all-contributorsrc with the bug badge!

@fkiraly fkiraly changed the title fix an error predict_series is undefined if X is passed as a numpy array [BUG] plot_cluster_algorithm: fix error "predict_series is undefined" if X is passed as np.ndarray Dec 26, 2022
@fkiraly fkiraly merged commit b4a8ede into sktime:main Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants