Ml4t Feature Selection logo

Ml4t Feature Selection

Organization
ml4t
ml4t-feature-selection

Select informative features using IC ranking, mutual information, or RFE - always within CV folds. Use when reducing feature dimensionality before training.

Overview

Publisherml4t
Repositoryskills
Skill nameml4t-feature-selection
Stars
45
Forks
13
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ml4t on GitHub. Read the source before you install it.

Installation

Install the Ml4t Feature Selection AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ml4t/skills/tree/main/features/feature-selection
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ml4t/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/features/feature-selection .claude/skills/ml4t-feature-selection
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ml4t Feature Selection in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ml4t Feature Selection on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ml4t Feature Selection is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Feature Selection

Selecting features on the full dataset is a form of lookahead bias. The test set influences which features are kept, inflating out-of-sample performance. Feature selection must happen inside each CV fold.

The Problem

With 50 features and a finite sample, some will correlate with forward returns by chance alone. If you rank features by IC on the full dataset and keep the top 10, those 10 are partly selected for noise. Out-of-sample, the noise component vanishes and the model underperforms expectations.

The Pattern

WRONG

python
from scipy.stats import spearmanr
import numpy as np

# Feature selection on full dataset - leaks test-set information
ic_scores = {col: abs(spearmanr(X[col], y).statistic) for col in X.columns}
selected = sorted(ic_scores, key=ic_scores.get, reverse=True)[:20]
model.fit(X[selected], y)

CORRECT

python
from scipy.stats import spearmanr
from sklearn.model_selection import TimeSeriesSplit
import numpy as np

tscv = TimeSeriesSplit(n_splits=5)
for train_idx, test_idx in tscv.split(X):
    X_train, y_train = X[train_idx], y[train_idx]

    # Select features using ONLY training data
    ic_scores = {
        col: abs(spearmanr(X_train[:, i], y_train).statistic)
        for i, col in enumerate(feature_names)
    }
    selected = sorted(ic_scores, key=ic_scores.get, reverse=True)[:20]
    sel_idx = [feature_names.index(f) for f in selected]

    model.fit(X_train[:, sel_idx], y_train)
    preds = model.predict(X[test_idx][:, sel_idx])

Selection Methods

MethodTypeWhen to Use
IC rankingUnivariateQuick filter, large feature set
Mutual informationUnivariateNon-linear relationships
L1 regularizationEmbeddedDuring training (Lasso, ElasticNet)
SHAP importanceModel-basedAfter training, interpretation
Recursive feature eliminationWrapperSmall feature set, expensive

Collinearity Removal (Pre-Selection)

python
import numpy as np

def remove_collinear(corr_matrix: np.ndarray, feature_names: list, threshold: float = 0.8) -> list:
    """Drop one feature from each highly correlated pair."""
    to_drop = set()
    for i in range(len(feature_names)):
        for j in range(i + 1, len(feature_names)):
            if abs(corr_matrix[i, j]) > threshold:
                to_drop.add(feature_names[j])
    return [f for f in feature_names if f not in to_drop]

Selection Stability Diagnostic

python
# Track which features are selected across folds
from collections import Counter
fold_selections = Counter()
for train_idx, _ in tscv.split(X):
    selected = select_top_k(X[train_idx], y[train_idx], k=20)
    fold_selections.update(selected)

# Features selected in <50% of folds are unstable - likely noise
stable = [f for f, count in fold_selections.items() if count >= len(list(tscv.split(X))) // 2]

Guardrails

  • Selection inside CV is non-negotiable - any global selection is lookahead bias
  • Stability across folds matters - a feature selected in 1/5 folds is noise
  • IC > 0.1 is suspicious - investigate for leakage before trusting
  • Collinearity removal is safe pre-CV - it uses only feature-feature correlation, not the target
  • Log your search set - each knob (lookback, threshold, feature family) multiplies candidates; apply Benjamini-Hochberg FDR when comparing selections

Production Implementation

ml4t-diagnostic provides a validated feature selection pipeline:

python
from ml4t.diagnostic.selection import FeatureSelector, SelectionReport

selector = FeatureSelector(outcome_results, correlation_matrix)
selector.filter_by_ic(threshold=0.02).filter_by_correlation(threshold=0.8)
report: SelectionReport = selector.get_selection_report()
selected_features = report.final_features

Checklist

  • Feature selection happens inside each CV fold, never on the full dataset
  • Collinearity removed first (threshold 0.7-0.8)
  • Selection stability checked across folds (>50% agreement)
  • No feature with IC > 0.1 accepted without leakage investigation
  • Selected feature set documented and versioned

Frequently asked questions

What does the Ml4t Feature Selection AI skill do?

Select informative features using IC ranking, mutual information, or RFE - always within CV folds. Use when reducing feature dimensionality before training.

Why use Ml4t Feature Selection on TypingMind?

Because you install it once and use it with any model. Ml4t Feature Selection is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ml4t Feature Selection in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ml4t/skills/tree/main/features/feature-selection. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ml4t Feature Selection?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ml4t Feature Selection?

As many as you like. As long as a model supports skills, you can use Ml4t Feature Selection with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ml4t Feature Selection AI skill free?

Yes. It is published on GitHub by ml4t under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇