Skip to content

[DOC] Add example notebook for using aeon distances with sklearn clusterers #2511

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 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
eccd899
Add example notebook for using aeon distances with sklearn clusterers
SalmanDeveloperz Jan 22, 2025
714be28
Resolved conflicts and updated notebook:
SalmanDeveloperz Jan 26, 2025
fd26c31
Simplified dataset loading using `load_unit_test(split="train")` as s…
SalmanDeveloperz Jan 26, 2025
450b0cc
Added this sentence after the introductory line:
SalmanDeveloperz Jan 26, 2025
49d8e66
Changes made:-
SalmanDeveloperz Jan 26, 2025
1ce463e
Added links to the scikit-learn documentation pages for all reference…
SalmanDeveloperz Jan 26, 2025
fb04db0
Updated distance-to-similarity conversion to normalize distances and …
SalmanDeveloperz Jan 26, 2025
0c3435b
Removed the references section as it was not cited in the notebook, p…
SalmanDeveloperz Jan 26, 2025
b033484
Added a reference to the new notebook (sklearn_clustering_with_aeon_d…
SalmanDeveloperz Jan 26, 2025
187e64f
Updated the aeon distances API reference link to a relative link for …
SalmanDeveloperz Feb 2, 2025
60a1950
Removed duplicate "Hierarchical Clustering" header to improve clarity…
SalmanDeveloperz Feb 2, 2025
83862dc
Added a reference to the new notebook in the Clustering-with-sklearn.…
SalmanDeveloperz Feb 2, 2025
f015b46
Merge branch 'main' into add-sklearn-clustering-example
SebastianSchmidl Feb 4, 2025
4e5adde
Automatic `pre-commit` fixes
SebastianSchmidl Feb 4, 2025
db35469
Added a reference to the new sklearn clustering notebook in the Clust…
SalmanDeveloperz Feb 4, 2025
d4e57a4
Fix: Corrected DTW metric in aeon pairwise_distance to resolve CI job…
SalmanDeveloperz Feb 18, 2025
b86069b
changing matric to method for dtw, trying to resolved the CI Jobs issue.
SalmanDeveloperz Feb 18, 2025
da602a4
Automatic `pre-commit` fixes
SalmanDeveloperz Feb 18, 2025
df7287d
Fix AgglomerativeClustering error by replacing 'affinity' with 'metri…
SalmanDeveloperz Feb 18, 2025
3dc8397
Merge branch 'add-sklearn-clustering-example' of https://github.com/S…
SalmanDeveloperz Feb 18, 2025
566d15d
Automatic `pre-commit` fixes
SalmanDeveloperz Feb 18, 2025
bf35035
Added sklearn clustering example image
SalmanDeveloperz Feb 19, 2025
ed052ee
Added sklearn clustering example image
SalmanDeveloperz Feb 19, 2025
fb45d29
Automatic `pre-commit` fixes
SalmanDeveloperz Feb 19, 2025
145d64f
Display notebook outputs and improve clustering accuracy
SalmanDeveloperz Mar 9, 2025
6cb7d79
Merge branch 'add-sklearn-clustering-example' of https://github.com/S…
SalmanDeveloperz Mar 9, 2025
68860e6
resolve conflict
SalmanDeveloperz Mar 9, 2025
50ca0e8
git commit -m "Fix IndentationError in sklearn_clustering_with_aeon_d…
SalmanDeveloperz Mar 9, 2025
bc8d54b
Re-applied Spectral clustering on time series data using Aeon
SalmanDeveloperz Apr 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@ Partitional TSCL

:::

:::{grid-item-card}
:img-top: examples/clustering/img/sklearn_clustering.png
:class-img-top: aeon-card-image-m
:link: /examples/clustering/sklearn_clustering_with_aeon_distances.ipynb
:link-type: ref
:text-align: center

Using aeon Distances with sklearn Clusterers

:::

::::

## Transformation
Expand Down
26 changes: 14 additions & 12 deletions examples/clustering/clustering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"# Time Series Clustering\n",
"\n",
Expand All @@ -23,13 +26,13 @@
"erative [16], Feature K-means [17], Feature K-medoids [17], U-shapelets [18],\n",
"USSL [19], RSFS [20], NDFS [21], Deep learning and dimensionality reduction\n",
"approaches see [22]"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"## Clustering notebooks\n",
"\n",
Expand All @@ -41,6 +44,8 @@
"these can be used in conjunction with `aeon` elastic distances. See the [sklearn and\n",
"aeon distances](../distances/sklearn_distances.ipynb) notebook.\n",
"\n",
"- For more detailed examples of using `aeon` distances with sklearn clusterers, refer to the [sklearn clustering with aeon distances](sklearn_clustering_with_aeon_distances.ipynb) notebook.\n",
"\n",
"- Deep learning based TSCL is a very popular topic, and we are working on bringing\n",
"deep learning functionality to `aeon`, first algorithms for [Deep learning] are\n",
"COMING SOON\n",
Expand All @@ -55,13 +60,13 @@
"\n",
"<img src=\"img/clst_cd.png\" width=\"600\" alt=\"cd_diag\">\n",
"\n"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"## References\n",
"\n",
Expand Down Expand Up @@ -141,10 +146,7 @@
"[22] B. Lafabregue, J. Weber, P. Gancarski, and G. Forestier. End-to-end deep\n",
"representation learning for time series clustering: a comparative study. Data Mining\n",
"and Knowledge Discovery, 36:29—-81, 2022\n"
],
"metadata": {
"collapsed": false
}
]
}
],
"metadata": {
Expand Down
Binary file added examples/clustering/img/sklearn_clustering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
323 changes: 323 additions & 0 deletions examples/clustering/sklearn_clustering_with_aeon_distances.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion examples/distances/sklearn_distances.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@
"collapsed": false
},
"source": [
"## Clustering with sklearn.cluster"
"## Clustering with sklearn.cluster\n",
"[Using aeon Distances with sklearn Clusterers](../clustering/sklearn_clustering_with_aeon_distances.ipynb)"
]
},
{
Expand Down
Loading