aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
1.02k stars 128 forks source link

[ENH] Rework series plotting to work with numpy arrays #2279

Closed TonyBagnall closed 2 weeks ago

TonyBagnall commented 3 weeks ago

Fixes #2278

the two univariate series plot functions plot_lag and plot_correlation now work with np.ndarray as well as pd.Series.

plot_series is the only one that takes multivariate. It was configured to plot either a single series or a list of series, thus making it in effect a duplicate of plot_collection. I have changed this so that it can now only plot a (possibly multivariate) series of valid type, e.g. np.ndarray, pd.Series or pd.DataFrame of shape (n_channels, n_timepoints). It will not work with a collection.

I have removed testing that was really in effect testing the legacy function check_y.

review-notebook-app[bot] commented 3 weeks ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

aeon-actions-bot[bot] commented 3 weeks ago

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ $\color{#FEF1BE}{\textsf{enhancement}}$ ].

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, any trivial fixes will automatically be pushed to your PR unless it is a draft.

Don't hesitate to ask questions on the aeon Slack channel if you have any.

PR CI actions

These checkboxes will add labels to enable/disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

MatthewMiddlehurst commented 2 weeks ago

conflicted

TonyBagnall commented 2 weeks ago

so its a little more complex than I thought, this function was being used to print lists of pd.Series with different axis, thus allowing two series to have different offsets. AS I have redone it, it is for a single series and I think lists of series should be a separate function.

hadifawaz1999 commented 2 weeks ago

mentioning this here as it is related

TonyBagnall commented 2 weeks ago

mentioning this here as it is related

good spot, I think this fixes #1036, list of numpy would be with plot_collection