{"id":17206524,"url":"https://github.com/sylvaincom/d-symb","last_synced_at":"2025-06-15T13:06:00.314Z","repository":{"id":197457195,"uuid":"698690751","full_name":"sylvaincom/d-symb","owner":"sylvaincom","description":"[ICDMW 2023] Python implementation of d_{symb}: \"An Interpretable Distance Measure for Multivariate Non-Stationary Physiological Signals\"","archived":false,"fork":false,"pushed_at":"2024-12-04T23:04:13.000Z","size":11314,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T22:09:30.277Z","etag":null,"topics":["distance","multivariate-timeseries","non-stationary","time-series","visualization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sylvaincom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-30T17:03:07.000Z","updated_at":"2025-03-18T11:09:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"eefecf71-71f8-4530-8553-ed55edda215a","html_url":"https://github.com/sylvaincom/d-symb","commit_stats":null,"previous_names":["sylvaincom/d_symb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sylvaincom/d-symb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvaincom%2Fd-symb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvaincom%2Fd-symb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvaincom%2Fd-symb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvaincom%2Fd-symb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sylvaincom","download_url":"https://codeload.github.com/sylvaincom/d-symb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvaincom%2Fd-symb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259981466,"owners_count":22941148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distance","multivariate-timeseries","non-stationary","time-series","visualization"],"created_at":"2024-10-15T02:28:53.843Z","updated_at":"2025-06-15T13:06:00.248Z","avatar_url":"https://github.com/sylvaincom.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# $d_{symb}$: An Interpretable Distance Measure for Multivariate Non-Stationary Physiological Signals\n\n\u003e **_NOTE:_** :new: :new: We developed and published the $d_{symb}$ playground [[website](https://sylvaincom.github.io/publication/2024-05-16-dsymb-icde) / [code](https://github.com/boniolp/dsymb-playground) / [Streamlit app](https://dsymb-playground.streamlit.app/) / [4 min YouTube video](https://youtu.be/4verma-Aqo8)], a online tool (Streamlit application) to apply $d_{symb}$ to your uploaded data.\n\nThis repository contains the code to reproduce all experiments in our $d_{symb}$ publication [[paper](https://ieeexplore.ieee.org/abstract/document/10411636) / [PDF](http://www.laurentoudre.fr/publis/ICDM2023.pdf)]:\n\u003e S. W. Combettes, C. Truong, and L. Oudre.\nAn Interpretable Distance Measure for Multivariate Non-Stationary Physiological Signals.\nIn _Proceedings of the International Conference on Data Mining Workshops (ICDMW)_, Shanghai, China, 2023.\n\n```\n@inproceedings{2023_combettes_dsymb_icdm,\n  author={Combettes, Sylvain W. and Truong, Charles and Oudre, Laurent},\n  booktitle={2023 IEEE International Conference on Data Mining Workshops (ICDMW)}, \n  title={An Interpretable Distance Measure for Multivariate Non-Stationary Physiological Signals}, \n  year={2023},\n  pages={533-539},\n  doi={10.1109/ICDMW60847.2023.00076},\n  location={Shanghai, China},\n}\n```\n\nAll the code is written in Python (scripts and notebooks).\n\n\u003cdetails\u003e\u003csummary\u003e\u003ci\u003eToggle for the paper's abstract!\u003c/i\u003e\u003c/summary\u003eWe introduce d_{symb}, a novel distance measure for comparing multivariate non-stationary physiological signals. Unlike most distance measures on multivariate signals such as variants of Dynamic Time Warping (DTW), d_{symb} can take into account their non-stationarity thanks to a symbolization step. This step is based on a change-point detection procedure, that splits a non-stationary signal into several stationary segments, followed by quantization using K-means clustering. The proposed distance measure leverages the general edit distance that is applied to the symbolic sequences. The performance of d_{symb} compared to two commonly used DTW variants is illustrated by applying it to physiological signals recorded during walking protocols. In particular, d_{symb} is shown to be interpretable: its symbolization detects the segments that correspond to salient behaviors. An open source GitHub repository is made available to reproduce all the experiments in Python.\u003c/details\u003e\u003c/br\u003e\n\nPlease let us know of any issue you might encounter when using this code, either by opening an issue on this repository or by sending an email to `sylvain.combettes8 [at] gmail.com`. Or if you just need some clarification or help.\n\n## How is a symbolic representation implemented?\n\nFor $d_{symb}$, a symbolic representation (with an associated distance) is a scikit-learn pipeline based on the following classes in the `src` folder:\n1. `SegmentFeature` (in `segmentation.py`)\n1. `Segmentation` (in `segment_features.py`)\n1. `Symbolization` (in `symbolization.py`)\n1. `SymbolicSignalDistance` (in `symbolic_signal_distance.py`)\n\n## Structure of the code\n\n`date_exp` is a string (for example `\"2023_12_01\"`) in order to version the experiments.\n\nThe code inputs / outputs the following files:\n1. in the `data` folder: the gait data set (the only necessary input)\n1. in the `results/{date_exp}` folder: results such distance matrices (it also currently contains precomputed outputs)\n1. in the `results/{date_exp}/img` folder: figures, plots\n\n## How to use this repository to reproduce the $d_{symb}$ paper\n\nRun the `interpret_distance_dsymb_gait.ipynb` notebook. More information is provided at the beginning of this notebook.\n\n## Requirements\n\n- loadmydata==0.0.9\n- matplotlib==3.7.2\n- numpy==1.23.5\n- pandas==2.0.3\n- plotly==5.10.0\n- ruptures==1.1.7\n- scikit-learn==1.2.2\n- scipy==1.9.3\n- seaborn==0.12.2\n- statsmodels==0.14.0\n- tslearn==0.6.1\n- weighted-levenshtein==0.2.1\n\n## Licence\n\nThis project is licensed under the BSD 2-Clause License, see the `LICENSE.md` file for more information.\n\n## Contributors\n\n* [Sylvain W. Combettes](https://sylvaincom.github.io/) (Centre Borelli, ENS Paris-Saclay)\n* [Charles Truong](https://charles.doffy.net/) (Centre Borelli, ENS Paris-Saclay)\n* [Laurent Oudre](http://www.laurentoudre.fr/) (Centre Borelli, ENS Paris-Saclay)\n\n## Acknowledgments\n\nSylvain W. Combettes is supported by the IDAML chair (ENS Paris-Saclay) and UDOPIA (ANR-20-THIA-0013-01).\nCharles Truong is funded by the PhLAMES chair (ENS Paris-Saclay).\nPart of the computations has been executed on Atos Edge computer, funded by the IDAML chair (ENS Paris-Saclay).\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"700\" src=\"https://github.com/boniolp/dsymb-playground/blob/main/figures/cebo_logos.png\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylvaincom%2Fd-symb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsylvaincom%2Fd-symb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylvaincom%2Fd-symb/lists"}