Catboost multirmse

From wenmin-wu/ds-skills · View interactive version

Catboost multirmse is an AI agent skill from the GitHub repository wenmin-wu/ds-skills. CatBoostRegressor with MultiRMSE loss for native multi-output regression, predicting all targets in a single model without per-target loops.

How to use this skill

Skill file

CatBoost MultiRMSE

Overview

Most gradient boosting libraries (XGBoost, LightGBM) require fitting one model per output column for multi-output regression — slow when there are 100+ targets. CatBoost's MultiRMSE loss natively handles multiple outputs in a single model, sharing tree structure across targets. This is 5-50x faster than per-target loops and can capture cross-target correlations. Combined with SVD target compression, it enables efficient prediction of thousands of outputs.

Quick Start

from catboost import CatBoostRegressor

params = {
    'learning_rate': 0.1,
    'depth': 7,
    'l2_leaf_reg': 4,
    'loss_function': 'MultiRMSE',
    'eval_metric': 'MultiRMSE',
    'iterations': 200,
    'boosting_type': 'Plain',
    'bootstrap_type': 'Bayesian',
    'allow_const_label': True,
    'random_state': 42,
}

model = CatBoostRegressor(**params)
model.fit(X_train, Y_train, eval_set=(X_val, Y_val), verbose=50)
preds = model.predict(X_test)  # shape: (n_test, n_targets)

Workflow

  1. Prepare target matrix Y with shape (n_samples, n_targets)
  2. Configure CatBoostRegressor with loss_function='MultiRMSE'
  3. Fit single model on all targets simultaneously
  4. Predict returns (n_samples, n_targets) array directly

Key Decisions

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.