Skip to content
Back to skills

Matrix Profile Basics

ASecurity

"Compute and validate 1-D STUMPY matrix profiles and distance

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
testingpythonapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill matrix-profile-basics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Matrix Profile Basics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Matrix Profile Basics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-matrix-profile-basics/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-matrix-profile-basics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: matrix-profile-basics
description: "Compute and validate 1-D STUMPY matrix profiles and distance
  profiles, including normalized and non-normalized routes, AB-joins, top-k
  output, pandas/polars inputs, and profile interpretation."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# STUMPY matrix-profile basics

Use this sub-skill for 1-D profile computation, inspection, and smoke validation with `stumpy.stump`, `stumpy.aamp`, and `stumpy.mass`.

Do not use it for:
- multidimensional profiles or subspace selection -> `multidimensional-profiles`
- motifs, matches, discords, snippets, or segmentation -> `motifs-anomalies-segmentation`
- approximate, streaming, or pan profiles -> `approximate-streaming-pan`
- Dask, Ray, or CUDA setup -> `distributed-gpu-acceleration`

## Fast routing

- **Z-normalized matrix profile:** `stumpy.stump(T_A, m, ...)`
- **Raw matrix profile:** `stumpy.aamp(T_A, m, ...)`
- **Distance profile:** `stumpy.mass(Q, T, ...)`
- **AB-join:** pass `T_B` and set `ignore_trivial=False`
- **Top-k results:** set `k > 1` and read the `mparray` attributes

## Input rules

- Use floating-point inputs, usually `np.float64`, pandas `Series`, or polars `Series`.
- Keep 1-D inputs 1-D. DataFrames are transposed before conversion and are better suited to multidimensional workflows.
- Window size must be at least 3 and no larger than the shortest input series.
- Self-joins use `ignore_trivial=True`; AB-joins use `ignore_trivial=False`.
- If you already know constant subsequences, you can supply `T_A_subseq_isconstant` / `T_B_subseq_isconstant` / `Q_subseq_isconstant` to the exact API.
- If the task turns into motifs, matches, discords, snippets, or segmentation, stop after the profile and route out.

## Runtime handoff

- Verify the install/import path with `scripts/profile_smoke.py`.
- Default smoke command: `python scripts/profile_smoke.py --mode exact`
- Use `--mode ab-join`, `--mode aamp`, or `--mode mass` for the other basic routes.
- The smoke script uses tiny synthetic data only and does not touch the network or any files.

## Read the profile

- `stump` and `aamp` return an object-dtype `mparray`.
- For `k = 1`, each row stores `[P, I, left_I, right_I]`.
- Use `mp.P_`, `mp.I_`, `mp.left_I_`, and `mp.right_I_` instead of slicing when possible.
- Negative indices mean no eligible neighbor was found.
- `mass` returns a `float64` distance profile, not a matrix-profile object.
- If you need to interpret motifs or follow-on pattern matches, route to the downstream analysis sub-skill.

## Normalize or not

- `stump(..., normalize=False)` routes to the raw-distance implementation.
- `mass(..., normalize=False)` routes to the raw-distance implementation.
- `p` is only meaningful for non-normalized distance calculations.

Files in this skill

  • SKILL.md2.8 KB
  • references/api-reference.md4.5 KB
  • references/troubleshooting.md4 KB
  • references/workflows.md4 KB
  • scripts/profile_smoke.py4.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.