fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Matrix-Profile Motif Discovery

Install and import#

bash
npm install fintech-algorithms
ts
import { discover } from "fintech-algorithms/geometric-chart-patterns/pattern-matching/matrix-profile-motif-discovery";

Signature#

discover()

Worked example#

executed This entry is a thin wrapper its test never calls directly, so it was invoked with the arguments its shared implementation received. Real output, not asserted against a published figure.

Input#

argument 1
[99.881237, 100.116364, 100.33311, 100.355799, 100.226037, 100.187182]

Showing 6 of 120 elements.

argument 2
16
argument 3
null

Call#

discover()

Returns#

object with 7 fields: window, exclusion_zone, profile, profile_index, motif_pair, motif_distance, normalization

{
  "window": 16,
  "exclusion_zone": 8,
  "profile": [
    1.442017209318879,
    1.4259996875986038,
    1.5353435003673506,
    1.6155150461182326,
    1.885889075174815,
    3.93842156909414
  ],
  "profile_index": [12, 13, 14, 15, 15, 53],
  "motif_pair": [20, 72],
  "motif_distance": 3.6400104112014625e-15,
  "normalization": "population-z-score-per-subsequence"
}

Diagrams#

Matrix-Profile Motif Discovery — algorithm anatomy
Matrix-Profile Motif Discovery — article hero
Matrix-Profile Motif Discovery — calculation ledger
Matrix-Profile Motif Discovery — causal timeline
Matrix-Profile Motif Discovery — failure boundary
Matrix-Profile Motif Discovery — method comparison

How it works#

This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.

Read the article →

References#

The rest of the Pattern Matching family#