rmsle-zero-threshold-asymmetry

rmsle-zero-threshold-asymmetry is a skill for Claude Code, Codex from topprismdata/cultivating-ml-agent. It costs 109 tokens per session (1,363 once invoked), scanned A, original, MIT.

A guide to choosing prediction cutoffs for forecasting tasks scored with RMSLE, a metric that compares logarithms of predicted and actual values. It focuses on whether very small predictions should be changed to zero.

In plain words
What is it for?
Use it when testing fixed, minimum-sales, or adaptive zeroing rules for time-series forecasts, especially when local validation and leaderboard results disagree.
Why use it?
It explains why a seemingly smarter cutoff can worsen competition leaderboard results, even when cross-validation improves. The main issue is that predicting zero for a real sale can be much more costly than predicting a small positive value for no sale.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when testing fixed, minimum-sales, or adaptive zeroing rules for time-series forecasts, especially when local validation and leaderboard results disagree.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/topprismdata/cultivating-ml-agent/rmsle-zero-threshold-asymmetry
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add topprismdata/cultivating-ml-agent --skill rmsle-zero-threshold-asymmetry
Clone the repo
git clone --depth 1 https://github.com/topprismdata/cultivating-ml-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rmsle-zero-threshold-asymmetry

README.md
[![agentmods](https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/rmsle-zero-threshold-asymmetry/github.svg)](https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/rmsle-zero-threshold-asymmetry)
Your own site
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/rmsle-zero-threshold-asymmetry"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/rmsle-zero-threshold-asymmetry/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rmsle-zero-threshold-asymmetry

Your own site · 80×15
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/rmsle-zero-threshold-asymmetry"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/rmsle-zero-threshold-asymmetry.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,363 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.01363
Opus 5 $0.00055 $0.00681
Sonnet 5 $0.00022 $0.00273
Haiku 4.5 $0.00011 $0.00136

Measured 11d ago against content hash 77caeba6bd0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rmsle-zero-threshold-asymmetry scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/examples/rmsle-zero-threshold-asymmetry/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RMSLE Zero-Threshold Asymmetry

Problem

When optimizing post-processing for RMSLE metrics, "smarter" adaptive zero-thresholds that use historical min-sales or store-family-level statistics can WORSE leaderboard scores compared to simple fixed thresholds like < 0.1 → 0.

Symptoms

  • Model improvements (better features, better CV) appear to have NO effect or NEGATIVE effect on LB after changing post-processing
  • Zero ratio in submission increases significantly (e.g., 8% → 12%) after "improving" the zeroing logic
  • Items with ~60-70% historical zero rate and ~30-40% non-zero rate are most affected
  • Controlled experiment (same model + different post-processing) reveals large LB gap

Root Cause

RMSLE has a fundamental asymmetry:

Predicting small positive when actual = 0:  log1p(0.27)^2 = 0.057  (small error)
Predicting 0 when actual = 2.88:            log1p(2.88)^2 = 1.84   (huge error)

For items with ~68% zero rate and ~32% non-zero rate (mean ~2.9 when non-zero):

  • Expected error of predicting 0.27: 0.68 * 0.057 + 0.32 * 1.26 = 0.44
  • Expected error of predicting 0: 0.68 * 0 + 0.32 * 1.84 = 0.59

Predicting a small positive value is 25% better than predicting 0, even though the item is zero 68% of the time. The penalty for missing a non-zero sale (log1p) far exceeds the penalty for over-predicting a zero sale.

Solution

Rule 1: Use simple fixed thresholds for RMSLE

# GOOD: Simple, proven threshold
predictions[predictions < 0.1] = 0

# BAD: Complex adaptive threshold — can aggressively zero legitimate predictions
min_threshold = historical_min_nonzero_sales * 0.5
mask = (predictions > 0) & (predictions < min_threshold) & (zero_rate > 0.5)
predictions[mask] = 0  # This zeros 1,172 legitimate predictions!

Rule 2: Verify post-processing changes with controlled experiments

When changing post-processing, create a controlled submission:

  1. Take the SAME model predictions
  2. Apply ONLY the post-processing change
  3. Submit both versions to compare LB impact

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 123 lines · 109 tokens per session scan A 77caeba6bd0d

Subscribe to this mod's changes

rmsle-zero-threshold-asymmetry is a skill published in the GitHub repository topprismdata/cultivating-ml-agent (5 stars, last pushed 14d ago), licensed MIT. It adds 109 tokens to every session and 1,363 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

huggingface-hub

Hugging Face Hub CLI (hf) — search, download, and upload models and datasets, manage repos, query datasets with SQL, deploy inference endpoints, manage Spaces and buckets.

braxtonROSE4/zorro-agent · 43 tokens

tensorboard

Visualize training metrics, debug models with histograms, compare experiments, visualize model graphs, and profile performance with TensorBoard - Google's ML visualization toolkit.

davila7/claude-code-templates · 32 tokens

mlflow

Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow - framework-agnostic ML lifecycle platform.

davila7/claude-code-templates · 33 tokens

datachain-knowledge

Use whenever datasets, cloud storage buckets, or data pipelines are mentioned — creating, saving, querying, listing, exploring, deleting, or processing data in S3, GCS, Azure Blob, or local storage. Also use when running any script that may create datasets as a side effect. Maintains a knowledge base at dc-knowledge/…

datachain-ai/datachain · 104 tokens

prompt-scanner

A scanner for text sent to an AI agent, looking for prompt injection and jailbreak attempts. Prompt injection is text that tries to override an agent's instructions; a jailbreak tries to bypass its safety limits.

alibaba/anolisa · 103 tokens

install-openviking-memory

Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…

volcengine/OpenViking · 191 tokens