Skip to content
Back to skills

Frequent Patterns

ASecurity

"Mine frequent itemsets and association rules from transaction data

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
datagoapi

Works with

  • api

Security analysis

A100/100

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

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill frequent-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Frequent Patterns?

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

Security grade badge for Frequent Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-frequent-patterns/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-frequent-patterns)

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: frequent-patterns
description: "Mine frequent itemsets and association rules from transaction data
  with mlxtend frequent_patterns."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# Frequent Patterns

Use this sub-skill when the task involves market-basket or transaction mining with `mlxtend.frequent_patterns`: frequent itemsets, maximal itemsets, association rules, support/confidence/lift-style metrics, null-aware FP mining, sparse one-hot data, or threshold diagnosis.

## Route first

- Start with [references/data-formats.md](references/data-formats.md) when the input is raw transactions, one-hot pandas data, sparse data, nullable data, or previously mined itemsets/rules.
- Use [references/api-reference.md](references/api-reference.md) for verified function signatures, return columns, algorithm differences, and metric names.
- Use [references/workflows.md](references/workflows.md) for transaction-to-rules recipes, algorithm selection, rule filtering, null handling, and support/threshold tuning.
- Use [references/troubleshooting.md](references/troubleshooting.md) for invalid inputs, missing columns, empty results, metric errors, nullable/sparse warnings, and memory growth.
- Run [scripts/frequent_patterns_smoke.py](scripts/frequent_patterns_smoke.py) to verify that the installed package can encode transactions, mine itemsets, and generate rules on a tiny deterministic dataset.

## Boundaries

- Prefer `TransactionEncoder` only as the upstream route from list-of-lists transactions into a one-hot pandas DataFrame. For broader preprocessing and transformer behavior, route to [../feature-workflows/SKILL.md](../feature-workflows/SKILL.md).
- Do not handle plotting or visualization here. Route rule plots, heatmaps, and Matplotlib utilities to [../plotting-and-utilities/SKILL.md](../plotting-and-utilities/SKILL.md).
- Keep downstream mining code package-based; the runtime workflow must use only installed package APIs and bundled skill files.

## Fast decision map

| Goal | Primary API | Notes |
|---|---|---|
| All frequent itemsets, classic candidate search | `apriori` | Supports `low_memory` and `n_jobs`; no nullable-NaN mode. |
| All frequent itemsets, usually faster on sparse/large baskets | `fpgrowth` | FP-tree based; supports `null_values=True`. |
| Only maximal frequent itemsets | `fpmax` | Compact output; not a full subset lattice for normal rule metrics. |
| All frequent itemsets via H-Mine | `hmine` | Alternative frequent-itemset miner; no nullable-NaN mode. |
| Rules from complete frequent itemsets | `association_rules` | Requires `support` and `itemsets`; use full itemset output unless `support_only=True`. |
| Raw transactions to one-hot DataFrame | `TransactionEncoder` | Create `pd.DataFrame(te.fit_transform(transactions), columns=te.columns_)`. |

Files in this skill

  • SKILL.md2.8 KB
  • references/api-reference.md7.2 KB
  • references/data-formats.md6.1 KB
  • references/troubleshooting.md6.9 KB
  • references/workflows.md7.4 KB
  • scripts/frequent_patterns_smoke.py6.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.