{"id":18561616,"url":"https://github.com/ajayarunachalam/msda","last_synced_at":"2025-10-05T12:37:09.011Z","repository":{"id":39946110,"uuid":"335700054","full_name":"ajayarunachalam/msda","owner":"ajayarunachalam","description":"Library for multi-dimensional, multi-sensor, uni/multivariate time series data analysis, unsupervised feature selection, unsupervised deep anomaly detection, and prototype of explainable AI for anomaly detector","archived":false,"fork":false,"pushed_at":"2021-10-07T13:13:47.000Z","size":12020,"stargazers_count":115,"open_issues_count":0,"forks_count":30,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-04-30T01:01:53.040Z","etag":null,"topics":["anamoly-detection-using-graphs","anomaly-detection","correlation","data-analysis","deep-learning","deep-neural-networks","explainable-artificial-intelligence","feature-engineering","feature-selection","multidimensional-data","multisensor","python","pytorch","sensor","sensor-data","signal-processing","tabular-data","time-series","variation","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajayarunachalam.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}},"created_at":"2021-02-03T17:18:35.000Z","updated_at":"2024-04-25T23:25:14.000Z","dependencies_parsed_at":"2022-06-25T17:32:23.791Z","dependency_job_id":null,"html_url":"https://github.com/ajayarunachalam/msda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayarunachalam%2Fmsda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayarunachalam%2Fmsda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayarunachalam%2Fmsda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayarunachalam%2Fmsda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajayarunachalam","download_url":"https://codeload.github.com/ajayarunachalam/msda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229948906,"owners_count":18149574,"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":["anamoly-detection-using-graphs","anomaly-detection","correlation","data-analysis","deep-learning","deep-neural-networks","explainable-artificial-intelligence","feature-engineering","feature-selection","multidimensional-data","multisensor","python","pytorch","sensor","sensor-data","signal-processing","tabular-data","time-series","variation","visualization"],"created_at":"2024-11-06T22:07:25.065Z","updated_at":"2025-10-05T12:37:03.992Z","avatar_url":"https://github.com/ajayarunachalam.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview \n\npypi: https://pypi.org/project/msda/\n\nRelated Blog: https://towardsdatascience.com/explainable-ai-xai-design-for-unsupervised-deep-anomaly-detector-6bd1275ed3fc\n               \nRelated Blog: https://ajay-arunachalam08.medium.com/multi-dimensional-time-series-data-analysis-unsupervised-feature-selection-with-msda-package-430900a3829a\n\nRelated Blog: https://ajay-arunachalam08.medium.com/multidimensional-multi-sensor-time-series-data-analysis-framework-5c497d8d106b\n\nMSDA is a prototype for unsupervised feature selection and/or unsupervised deep convolutional neural network \u0026 lstm autoencoders based real-time anomaly detection from high-dimensional heterogeneous/homogeneous time series multi-sensor data. It also includes a module of Explainable AI for the built time-series anomaly predictor.\n\nIntuitive representation of the unsupervised feature selection is as shown below.\n\n![alt text](https://github.com/ajayarunachalam/msda/blob/main/conceptual_framework_msda_new.png)\n\nIntuitive representation of the unsupervised real-time point anomalies detection is as shown below.\n\n![alt text](https://github.com/ajayarunachalam/msda/blob/main/anomalies_msda.png)\n\nFrom local explanations to global understanding with explainable AI for trees - motivation from here - https://www.nature.com/articles/s42256-019-0138-9\n\n![alt text](https://github.com/ajayarunachalam/msda/blob/main/shap_conceptual.png), Image credits - https://github.com/slundberg/shap\n\n# MSDA 1.10.0\n\n## What is MDSA?\nMSDA is an open source `low-code` Multi-Sensor Data Analysis library in Python that aims to reduce the hypothesis to insights cycle time in a time-series multi-sensor data analysis \u0026 experiments. It enables users to perform end-to-end proof-of-concept experiments quickly and efficiently. The module identifies events in the multidimensional time series by capturing the variation and trend to establish relationship aimed towards identifying the correlated features helping in feature selection from raw sensor signals. Also, it provides a provision to precisely detect the anomalies in real-time streaming data an unsupervised deep convolutional neural network \u0026 also a lstm autoencoders based detectors are designed to run on GPU/CPU. Finally, a game theoretic approach is used to explain the output of the built anomaly detector model. \n\n\nThe package includes:-\n1) Time series analysis.\n2) The variation of each sensor column wrt time (increasing, decreasing, equal).\n3) How each column values varies wrt other column, and the maximum variation ratio between each column wrt other column.\n4) Relationship establishment with trend array to identify most appropriate sensor.\n5) User can select window length and then check average value and standard deviation across each window for each sensor column.\n6) It provides count of growth/decay value for each sensor column values above or below a threshold value.\n7) Feature Engineering \n    a) Features involving trend of values across various aggregation windows: change and rate of change in average, std. deviation across window.\n    b) Ratio of changes, growth rate with std. deviation.\n    c) Change over time.\n    d) Rate of change over time.\n    e) Growth or decay.\n    f) Rate of growth or decay.\n    g) Count of values above or below a threshold value.\n8) ** Unsupervised deep time-series anomaly detector. **\n9) ** Game theoretic approach to explain the time-series data model. **\n\n\nMSDA is `simple`, `easy to use` and `low-code`. \n\n## Features\n\n![alt text](https://github.com/ajayarunachalam/msda/blob/main/features_msda_new.png)\n\n## Unsupervised FS Workflow\n\n![alt text](https://github.com/ajayarunachalam/msda/blob/main/flowchart_msda.png)\n\n## Unsupervised time-series anomaly detector workflow\n\n** Deep Convolutional Neural Network **\n\n![alt text](https://github.com/ajayarunachalam/msda/blob/main/deepCNN.gif) inspiration from this IEEE paper - https://ieeexplore.ieee.org/document/8581424\n\n** LSTM Autoencoder **\n\n![alt text](https://github.com/ajayarunachalam/msda/blob/main/lstm_ae.png) inspiration from here - https://www.nature.com/articles/s41598-019-55320-6\n\n## Features Coming Soon***\n\n1) Explainable Forecasting.\n2) ACF/PACF Analysis.\n3) Detection of False Trading Strategies Using Deep Unsupervised/Reinforcement Learning Methods.\n4) Optimization of the Trading Strategies (Long \u0026 Short Term) to maximize profit decision making.\n4) 3D Distribution Maps for MOX gas sensor signals.\n\n## Installation\nThe easiest way to install msda is using pip. \n\n```python\npip install msda\n```\n```terminal \n$ git clone https://github.com/ajayarunachalam/msda\n$ cd msda\n$ python setup.py install\n```\n\n## Notebook\n```notebook\n!pip install msda\n```\nFollow the rest as demonstrated in the demo example for Unsupervised Feature Selection [here] -- https://github.com/ajayarunachalam/msda/blob/main/demo.ipynb\n\nFollow the rest as demonstrated in the demo example for Unsupervised Deep Anomaly Detectors \u0026 Time series predictor as Explainable AI [here] -- https://github.com/ajayarunachalam/msda/blob/main/demo1_v1.ipynb\n\n## Dependencies\nMost of the dependencies are installed automatically. But, if not installed when you install MSDA, then these dependencies must be installed as shown below.\n\n```shell\npip install pandas\npip install numpy\npip install matplotlib\npip install datetime\npip install statistics\npip install torch\npip install seaborn\npip install sklearn\npip install scipy\npip install shap\npip install keras\npip install ipywidgets\n```\n\n## Python:\nInstallation is only supported on 64-bit version of Python. Tested on numpy version '1.18.3', pandas \u003c= '1.0.5', torch == 1.4.0, keras == 2.0.8, seaborn = '0.9.0', shap = '0.39.0', ipywidgets == 7.5.1\n\n## Important Links\n- Example Unsupervised Feature Selection Demo Notebook : https://github.com/ajayarunachalam/msda/blob/main/demo.ipynb\n- Example Unsupervised Anomaly Detector \u0026 Explainable AI Demo Notebook : https://github.com/ajayarunachalam/msda/blob/main/demo1_v1.ipynb\n\n\n## Who should use MSDA?\nMSDA is an open source library that anybody can use. In our view, the ideal target audience of MSDA is: \u003cbr /\u003e\n\n- Researchers for quick poc testing.\n- Experienced Data Scientists who want to increase productivity.\n- Citizen Data Scientists who prefer a low code solution.\n- Students of Data Science.\n- Data Science Professionals and Consultants involved in building Proof of Concept projects.\n\n\n\n## License\n\nCopyright 2021 Ajay Arunachalam \u003cajay.arunachalam08@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n© 2021 GitHub, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajayarunachalam%2Fmsda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajayarunachalam%2Fmsda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajayarunachalam%2Fmsda/lists"}