Ml4t Feature Validation logo

Ml4t Feature Validation

Organization
ml4t
ml4t-feature-validation

Validate features before training - IC significance, stability, redundancy, and contamination checks. Use when auditing feature quality before model fitting.

Overview

Publisherml4t
Repositoryskills
Skill nameml4t-feature-validation
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 Validation 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-validation
  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-validation .claude/skills/ml4t-feature-validation
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ml4t Feature Validation 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 Validation 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 Validation 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 Validation

A feature with IC of 0.05 on the full sample may have IC of 0.12 in one year and -0.03 in every other year. Without validation, the model trains on noise disguised as signal.

The Problem

Skipping feature validation leads to three failures: lookahead contamination, regime-specific features that fail live, and redundant features that waste model capacity.

The Pattern

WRONG

python
from sklearn.ensemble import GradientBoostingRegressor

# Train on all features without any validation - overfitting guaranteed
model = GradientBoostingRegressor(n_estimators=200)
model.fit(X_train, y_train)  # 50 features, no idea which are noise

CORRECT

python
from scipy.stats import spearmanr
import numpy as np

def validate_feature(feature: np.ndarray, target: np.ndarray, dates: np.ndarray) -> dict:
    """Screen a single feature for predictive quality."""
    ok = ~np.isnan(feature) & ~np.isnan(target)  # both: one nan makes ic nan
    ic, p_value = spearmanr(feature[ok], target[ok])
    quarters = dates.astype("datetime64[M]").astype(int) // 3  # numpy has no [Q]
    quarterly_ics = []
    for q in np.unique(quarters):
        mask = (quarters == q) & ok  # ok too: the floor counts VALID pairs
        if mask.sum() > 30:
            qic, _ = spearmanr(feature[mask], target[mask])
            quarterly_ics.append(qic)

    quarterly_ics = np.array(quarterly_ics)
    quarterly_ics = quarterly_ics[~np.isnan(quarterly_ics)]  # nan != a bad quarter
    ic_mean, ic_std = quarterly_ics.mean(), quarterly_ics.std()
    ic_ir = ic_mean / ic_std if ic_std > 0 else 0  # IC information ratio
    leakage_flag = abs(ic) > 0.10

    return {"ic": ic, "p_value": p_value, "ic_ir": ic_ir, "leakage_flag": leakage_flag,
            "pct_positive_quarters": np.mean(quarterly_ics > 0)}

Validation Checklist Sequence

StepCheckPass Criteria
1. CompletenessNull percentage< 5% (or documented imputation)
2. OutliersValues beyond 5 sigma< 1% (winsorize if needed)
3. IC significanceSpearman rank correlationp-value < 0.05
4. IC stabilityQuarterly IC information ratioIC-IR > 0.5
5. Leakage screenAbsolute IC threshold|IC| < 0.10 or explained mechanism
6. RedundancyPairwise correlation with existing features< 0.7

IC Decay Analysis

python
def ic_decay(feature: np.ndarray, returns: np.ndarray, horizons: list[int]) -> dict:
    """IC should decay with horizon - if it doesn't, suspect leakage."""
    n, decay = len(returns), {}
    gaps = np.r_[0, np.cumsum(np.isnan(returns))]  # missing returns so far
    cum = np.r_[1.0, np.cumprod(1.0 + np.nan_to_num(returns))]
    for h in horizons:
        if not 0 < h < n:
            decay[h] = np.nan  # no forward window of this length fits
            continue
        # Compounded t+1..t+h. np.roll wrapped the sample start into the tail,
        # and a plain cumprod let one missing return poison every later window.
        fwd, whole = np.full(n, np.nan), gaps[1 + h:n + 1] == gaps[1:n - h + 1]
        fwd[:n - h] = np.where(whole, cum[1 + h:n + 1] / cum[1:n - h + 1] - 1.0, np.nan)
        valid = ~np.isnan(feature) & ~np.isnan(fwd)
        ic, _ = spearmanr(feature[valid], fwd[valid])
        decay[h] = ic
    return decay  # Expect: decreasing |IC| as h increases

Guardrails

  • Non-decaying IC across horizons - strong sign of information leakage
  • Always validate on expanding windows - never compute IC on the full sample at once

Production Implementation

python
from ml4t.diagnostic.api import compute_ic_hac_stats, cross_sectional_ic_series
from ml4t.diagnostic.metrics import analyze_feature_outcome

ic_series = cross_sectional_ic_series(features, forward_returns, pred_col="signal", ret_col="forward_return", entity_col="symbol")
stats = compute_ic_hac_stats(ic_series)  # HAC-corrected t-stats

analysis = analyze_feature_outcome(
    predictions=features, prices=prices, pred_col="prediction",
    price_col="close", date_col="date", group_col="symbol",
)

Checklist

  • Every feature has IC computed with p-value < 0.05
  • IC stability checked across time (IC-IR > 0.5)
  • Any feature with |IC| > 0.10 investigated for leakage
  • IC peaks at expected horizon then decays (non-decaying IC suggests leakage)
  • Pairwise correlation < 0.7 with all other selected features
  • Null percentage < 5% and outliers winsorized

Frequently asked questions

What does the Ml4t Feature Validation AI skill do?

Validate features before training - IC significance, stability, redundancy, and contamination checks. Use when auditing feature quality before model fitting.

Why use Ml4t Feature Validation on TypingMind?

Because you install it once and use it with any model. Ml4t Feature Validation 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 Validation in TypingMind?

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

Which AI models can use Ml4t Feature Validation?

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 Validation?

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

Is the Ml4t Feature Validation 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 👇