Skip to content
Back to skills

Decomposition

ASecurity

"Routes scikit-plot PCA visualization requests for

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
dataapi

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 decomposition --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Decomposition?

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

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

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: decomposition
description: "Routes scikit-plot PCA visualization requests for
  component-variance and 2-D projection plots."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Decomposition

Use this sub-skill for the `scikitplot.decomposition` PCA visualization functions. These routes expect a fitted PCA-like estimator and return Matplotlib `Axes` objects.

## Route here

- Plot cumulative explained variance with `plot_pca_component_variance`.
- Plot a labeled 2-D PCA projection with `plot_pca_2d_projection`.
- Add biplot vectors and feature labels when the fitted estimator exposes component vectors.
- Validate the route quickly with `scripts/decomposition_smoke.py`.

## Inputs to check first

1. Fit the PCA estimator before plotting.
2. For component variance, confirm the estimator has `explained_variance_ratio_`.
3. For 2-D projection, confirm the estimator has `transform(X)` and produces at least two coordinates.
4. For biplots, confirm `components_[:2, :]` exists and `feature_labels`, if supplied, align with input features.
5. Pass `ax=` when embedding into a figure layout.

## Common decisions

- Use `target_explained_variance` to highlight the minimum component count that reaches a target cumulative ratio.
- Use `cmap` to choose class colors in projection plots.
- Use `biplot=True` only when feature vectors are meaningful and the plot will not be too crowded.
- Keep the PCA and data matrix in the same preprocessing space used during `fit`.

## Reroute

- Metric curves or silhouette analysis: `../metrics/SKILL.md`.
- Feature importances or learning curves: `../estimators/SKILL.md`.
- Elbow curves for clusterers: `../clustering/SKILL.md`.
- Legacy `scikitplot.plotters` calls to PCA helpers: `../legacy-factories/SKILL.md`.

## Read next

- `references/api-reference.md` for verified signatures and estimator requirements.
- `references/workflows.md` for component-variance and projection recipes.
- `references/troubleshooting.md` for unfitted PCA, missing attributes, biplot, and Axes errors.
- `scripts/decomposition_smoke.py` for a tiny Agg-backed PCA smoke run.

Files in this skill

  • SKILL.md2.1 KB
  • references/api-reference.md2 KB
  • references/troubleshooting.md1.6 KB
  • references/workflows.md2 KB
  • scripts/decomposition_smoke.py1.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.