aeon
aeon copied to clipboard
[DOC] Improve visualization module documentation
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.mdto correctly render theplotting_for_learning_tasksnotebook.
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.
- [x] 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.
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
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-commitchecks for all files - [ ] Run
mypytypecheck tests - [ ] Run all
pytesttests and configurations - [ ] Run all notebook example tests
- [ ] Run numba-disabled
codecovtests - [ ] Stop automatic
pre-commitfixes (always disabled for drafts) - [ ] Disable numba cache loading
- [ ] Push an empty commit to re-run CI checks
Hi are there any issues with this? It is still a draft.
There is a little change in examples.md I want to do, and additionally I am thinking of adding a notebook for estimator module.
Hi, @MatthewMiddlehurst I have made the changes, you can review it now.
Okay, I will work on it.
I was more referring to this 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.
Hi, Matthew, I have made the changes.
This is still incorrect, looks like the series length and number of channels are swapped.
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)
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?
Hi, @MatthewMiddlehurst, can you please take a look at the above message?
Yes probably best to transpose the matrix array. Does the documentation mention the dimensions of the output?
Sorry for the delayed response.
There is no mention of the expected input dimensions in the documentation.
In the latest commit, I modified the internal logic of the pairwise_distance_matrix function to handle the dimensions internally, so we no longer need to explicitly pass the transpose when calling the plotting function.
Do you think this approach is acceptable, or would you prefer we keep transposing the input explicitly at the call site?
I think maybe just leave the function as it is for now and input a univariate series (1d numpy array). The current image does not display 10 time points.
Hi, it is working fine for, 10 time series and 10 time points,
a = X[0:10, 10:20]
b = X[10:20, 10:20]
should I keep the function as it is?