{"id":18395048,"url":"https://github.com/eugene-kamenev/tsmp4j","last_synced_at":"2025-07-31T11:07:12.107Z","repository":{"id":187612368,"uuid":"673278600","full_name":"eugene-kamenev/tsmp4j","owner":"eugene-kamenev","description":"Time Series with Matrix Profile in Java","archived":false,"fork":false,"pushed_at":"2024-08-26T06:46:37.000Z","size":442,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T13:03:08.049Z","etag":null,"topics":["algorithms","anomaly-detection","clustering","data-mining","knn","matrixprofile","motif-analysis","motif-discovery","similarity-search","timeseries","timeseries-analysis"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eugene-kamenev.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}},"created_at":"2023-08-01T09:18:23.000Z","updated_at":"2024-08-26T06:46:39.000Z","dependencies_parsed_at":"2023-12-25T04:31:28.914Z","dependency_job_id":"b9f50665-b2b0-4ba2-a112-0b5abd563e06","html_url":"https://github.com/eugene-kamenev/tsmp4j","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"15f69324b1b50dbd020641464adc8202710f00f7"},"previous_names":["eugene-kamenev/tsmp4j"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugene-kamenev%2Ftsmp4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugene-kamenev%2Ftsmp4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugene-kamenev%2Ftsmp4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugene-kamenev%2Ftsmp4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eugene-kamenev","download_url":"https://codeload.github.com/eugene-kamenev/tsmp4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247589772,"owners_count":20963022,"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":["algorithms","anomaly-detection","clustering","data-mining","knn","matrixprofile","motif-analysis","motif-discovery","similarity-search","timeseries","timeseries-analysis"],"created_at":"2024-11-06T02:08:02.064Z","updated_at":"2025-04-07T03:34:51.588Z","avatar_url":"https://github.com/eugene-kamenev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Time Series with Matrix Profile in Java\n\nThis repository contains Matrix Profile algorithms implemented in Java.\nIt is an attempt to port algorithms presented\nin [tsmp](https://github.com/matrix-profile-foundation/tsmp).\n\n[The Matrix Profile](https://www.cs.ucr.edu/~eamonn/MatrixProfile.html), has the potential to\nrevolutionize time series data mining because of its generality,\nversatility, simplicity and scalability.\nIn particular, it has implications for time series motif discovery, time series joins, shapelet\ndiscovery (classification), density estimation, semantic segmentation, visualization, rule\ndiscovery, clustering etc.\n\nThis library includes the following algorithms to compute matrix profile:\n\nZ-Normalized Euclidean Distance:\n1. [STAMP](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/mp/stamp/STAMP.java) - Anytime matrix profile algorithm\n2. [STOMP](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/mp/stomp/STOMP.java) - Scalable ordered matrix profile algorithm\n3. [STOMPI](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/mp/stompi/STOMPI.java) - Incremental matrix profile algorithm\n4. [SKIMP](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/pmp/SKIMP.java) - Pan matrix profile algorithm\n5. [MPX](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/mp/mpx/MPX.java) - Matrix profile algorithm not based on FFT\n6. [MP-DIST (MASS2)](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/mp/mass/MASS2.java) - Fast distance search algorithm based on FFT\n7. [ContrastProfile](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/cp/ContrastProfileAlgorithm.java)\n8. [PanContrastProfile](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/cp/PanContrastProfileAlgorithm.java)\n9. [RelativeFrequencyMatrixProfile](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/cp/RelativeFrequencyMatrixProfileAlgorithm.java)\n10. [RelativeFrequencyContrastProfile](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/cp/RelativeFrequencyContrastProfileAlgorithm.java)\n11. [FLUSS](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/fluss/FLUSS.java) - timeseries segmentation based on matrix profile\n\nPure Euclidean Distance:\n1. [AAMP](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/mp/aamp/AAMP.java)\n\nAdditionally, this library includes extra algorithms not related to matrix profile:\n1. [MWF](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/extras/windowfinder/MWF.java) - Domain agnostic window size finder\n2. [trendSegmentR](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/extras/tguw/Trend.java) - Detection of linear trend changes for univariate time series\n3. [TGUW](/src/main/java/com/github/eugene/kamenev/tsmp4j/algo/extras/tguw/TGUW.java) - Tail-Greedy Unbalance Haar Wavelet decomposition\n\nMore algorithms will be added in the future.\n\n## Usage\nAll algorithms for matrix profile are built around [RollingWindowStatistics](/src/main/java/com/github/eugene/kamenev/tsmp4j/stats/RollingWindowStatistics.java) object. \nIt simply computes statistics required to run Matrix Profile algorithms on the fly, in a circular buffer manner, hence allows streaming data processing out of the box.\n\n### Streaming case\n```java\nDoubleStream stream = ... // your data stream\nvar bs = 1024; // statistics buffer size\nvar w = 10; // window for MP algorithm\nvar stamp = new STAMP(w, bs);\n\nstream.forEach(stamp::update); // it keeps statistics updated, not the matrix profile\n\nvar matrixProfile = stamp.get(); // execute MP algorithm for statistics collected\n```\n\n### Single batch case\n```java\ndouble[] data = ... // your data\nvar w = 10; // window for MP algorithm    \nvar matrixProfile = STAMP.of(data, w);\n\n```\n\nPlease refer to [tests](/src/test/groovy/com/github/eugene/kamenev/tsmp4j/algo) for more examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugene-kamenev%2Ftsmp4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feugene-kamenev%2Ftsmp4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugene-kamenev%2Ftsmp4j/lists"}