agentleFS
ChrisGVEChrisGVE/localdata-mcp/skills/modeling/dimensionality-reduction/SKILL.md

dimensionality-reduction

Skill4 starsChanged 15 months agoApache-2.0View on GitHub

Reduce high-dimensional data to fewer components for visualization or feature engineering using PCA, t-SNE, or UMAP. Use when data has many features and needs simplification.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Explore features: Call describe_database with the database name from $ARGUMENTS.

    line 14
  2. Very specific:

    Extract data: Call execute_query to select the numeric feature columns.

    line 16
  3. Very specific:

    Run PCA first: Call reduce_dimensions with algorithm "pca" and 2-3 components.

    line 18
  4. Very specific:

    Try t-SNE or UMAP for visualization: If PCA explains less than 50% of variance in 2D (data has complex nonlinear structure), call …

    line 25
  5. Distinctive:

    Not suitable for downstream modeling, only for visualization

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dimensionality Reduction

Reduce data to fewer dimensions for visualization, pattern discovery, or feature engineering.

Steps

  1. Explore features. Call describe_database with the database name from $ARGUMENTS. Identify all numeric columns. Call get_data_quality_report to check for nulls and assess feature distributions.
  2. Extract data. Call execute_query to select the numeric feature columns. Note the number of rows and features. High-dimensional data (10+ features) benefits most from reduction.
  3. Run PCA first. Call reduce_dimensions with algorithm "pca" and 2-3 components. Review:
    • Explained variance ratio per component (how much information each captures)
    • Cumulative explained variance (target > 70% in 2-3 components for good visualization)
    • Component loadings (which original features contribute most to each component)
  4. Interpret PCA components. Describe each component by its top-loading features. Name the components in domain terms when possible (e.g., "size factor" if height, weight, and volume all load heavily on PC1).
  5. Try t-SNE or UMAP for visualization. If PCA explains less than 50% of variance in 2D (data has complex nonlinear structure), call reduce_dimensions with "tsne" or "umap". These methods preserve local structure better but:
    • Distances between distant points are not meaningful
    • Results depend on hyperparameters (perplexity for t-SNE, n_neighbors for UMAP)
    • Not suitable for downstream modeling, only for visualization
  6. Compare methods. Assess which reduction best reveals structure: clusters, gradients, or outliers in the 2D view. PCA is interpretable; t-SNE/UMAP reveal groupings.
  7. Present results. Provide:
    • Method selected and rationale
    • Explained variance (PCA) or stress metric
    • Component interpretation with feature loadings
    • Visual description of the 2D structure (clusters, gradients, outliers)
    • Recommendations: use PCA components as features in /localdata-mcp:regression, or use groupings visible in t-SNE as input to /localdata-mcp:cluster-analysis

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.