Skip to content

[DOC] Improve visualization module documentation #2602

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Kaustbh
Copy link
Contributor

@Kaustbh Kaustbh commented Mar 9, 2025

Reference Issues/PRs

Fixes: #2580

What does this implement/fix? Explain your changes.

This PR addresses the following improvements in the Aeon documentation:

Adding New Notebooks:

  • Introduces notebooks for the distances and estimator modules.

Fixing Duplication:

  • Modifies examples.md to correctly render the plotting_for_learning_tasks notebook.

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

Any other comments?

PR checklist

For all contributions
  • I've added myself to the list of contributors. Alternatively, you can use the @all-contributors bot to do this for you after the PR has been merged.
  • The PR title starts with either [ENH], [MNT], [DOC], [BUG], [REF], [DEP] or [GOV] indicating whether the PR topic is related to enhancement, maintenance, documentation, bugs, refactoring, deprecation or governance.
For new estimators and functions
  • I've added the estimator/function to the online API documentation.
  • (OPTIONAL) I've added myself as a __maintainer__ at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.
For developers with write access
  • (OPTIONAL) I've updated aeon's CODEOWNERS to receive notifications about future changes to these files.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@aeon-actions-bot aeon-actions-bot bot added documentation Improvements or additions to documentation examples Example notebook related labels Mar 9, 2025
@aeon-actions-bot
Copy link
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ $\color{#F3B9F8}{\textsf{documentation}}$ ].
I have added the following labels to this PR based on the changes made: [ $\color{#45FD64}{\textsf{examples}}$ ]. Feel free to change these if they do not properly represent the PR.

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.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Stop automatic pre-commit fixes (always disabled for drafts)
  • Disable numba cache loading
  • Push an empty commit to re-run CI checks

@MatthewMiddlehurst
Copy link
Member

Hi are there any issues with this? It is still a draft.

@Kaustbh
Copy link
Contributor Author

Kaustbh commented Apr 3, 2025

There is a little change in examples.md I want to do, and additionally I am thinking of adding a notebook for estimator module.

@Kaustbh Kaustbh marked this pull request as ready for review April 24, 2025 03:13
@Kaustbh
Copy link
Contributor Author

Kaustbh commented Apr 24, 2025

Hi, @MatthewMiddlehurst I have made the changes, you can review it now.

@TonyBagnall TonyBagnall self-assigned this May 23, 2025
Copy link
Member

@MatthewMiddlehurst MatthewMiddlehurst left a comment

Choose a reason for hiding this comment

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

Hi, thanks for this. @TonyBagnall volunteered to review this in a recent meeting. One thing I noticed just at a glance is the distances figure is using too many series IMO, I think a single univariate series should be enough.

@Kaustbh
Copy link
Contributor Author

Kaustbh commented Jun 7, 2025

Okay, I will work on it.

@MatthewMiddlehurst
Copy link
Member

I was more referring to this image.
image

I would reduce the name of channels from 5 used in the notebook to 3, may be confusing to have the same series length and channels. a length of 5 is a bit short also for a series, I would say 10 minimum.

@Kaustbh
Copy link
Contributor Author

Kaustbh commented Jun 29, 2025

Hi, Matthew, I have made the changes.

@MatthewMiddlehurst
Copy link
Member

This is still incorrect, looks like the series length and number of channels are swapped.

@Kaustbh
Copy link
Contributor Author

Kaustbh commented Jul 8, 2025

Hi, when I am running the below code snippet,

from aeon.datasets import load_arrow_head
from aeon.distances import euclidean_pairwise_distance
from aeon.visualisation import plot_pairwise_distance_matrix

X, y = load_arrow_head(split="test", return_type="numpy2D")

a = X[10:15,:10] 
b = X[15:20,:10] 

distance_matrix = euclidean_pairwise_distance(a,b)

path = [(i, i) for i in range(len(a))]

_ = plot_pairwise_distance_matrix(distance_matrix, a, b, path)

image

Since I'm selecting 5 rows and 10 timepoints for both a and b, I expected the plots for a (blue) and b (orange) to show 5 lines, each representing one time series. However, the plot shows 10 lines instead.

Could this be due to how matplotlib.plot() interprets the 2D array (plotting one line per column)?
Would it make sense to transpose the input or loop through each row for plotting?

@Kaustbh
Copy link
Contributor Author

Kaustbh commented Jul 11, 2025

Hi, @MatthewMiddlehurst, can you please take a look at the above message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation examples Example notebook related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Improve documentation for Aeon’s visualization module (aeon.visualisation)
3 participants