Skip to main content

FRM-Miner

FRM-Miner: Efficient Motif Discovery in Large Collections of Time Series.

Pipeline of FRM-Miner: A time series database is discretised into a sequence database using SAX. Non-overlapping frequent sequential patterns without gaps are mined, after which their occurrences are mapped back to the time series. The occurrences are then used to construct frequent representative motifs.

This repository contains the Python implementation of FRM-Miner (in frm), as well as code to replicate the experiments (in experiments).

Installation

It is easiest to install FRM-Miner via pip:

pip install frm-miner

Frm-Miner 1.0

Looking for the conference version (S. J. Rotman, B. Cule and L. Feremans, "Efficiently Mining Frequent Representative Motifs in Large Collections of Time Series," 2023 IEEE International Conference on Big Data (BigData), Sorrento, Italy, 2023, pp. 66-75, doi: 10.1109/BigData59044.2023.10386145.)?

FRM-Miner 1.0

Example

You will probably get more meaningful results than this if you use your own data (collection of univariate time series, time series do not have to be equal length).

import numpy as np
import matplotlib.pyplot as plt  # Not a dependency

from frm import Miner

# Set hyperparameters
MINSUP = 0.3
SEGLEN = 5
ALPHA = 4
K = 4

# Generate 10 random time series with 100 observations each
rng = np.random.default_rng()
data = [rng.standard_normal(100) for _ in range(10)]

# Mine frequent representative motifs
miner = Miner(MINSUP, SEGLEN, ALPHA, k=K)
motifs = miner.mine(data)

# Plot frequent representative motifs
fig, axs = plt.subplots(ncols=K, sharey='all', layout='constrained')
for motif, ax in zip(motifs, axs):
    ax.plot(motif.representative)
plt.show()

Metadata

Release files for frm-miner 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frm-miner 2.0
File Size Uploaded
frm_miner-2.0.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for frm-miner 2.0
File Interpreter ABI Platform
frm_miner-2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / frm_miner-2.0.tar.gz

Download URL frm_miner-2.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c962551e0077393846d13de965f9e6f6471ea3f5409a9817eaa305d8ba439bf2
BLAKE2b-256 checksum
How to use checksums
8e32b03e72fe9b0b5966614d90d0ea9b727df625b30aa25930215c2e0e947a3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / frm_miner-2.0-py3-none-any.whl

Download URL frm_miner-2.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09f5dd3b1d94654fab720e7426e1a49d6017eea1fa7e60eae84f44f24a85fb5e
BLAKE2b-256 checksum
How to use checksums
9cf60b4b207427b45b9ba5d855d530603b7c1e7fbf44546b5ab22a6b478d83fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files

0.0.8

33 release files

0.0.7

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page