Skip to main content
subagent CX Codex

scikit-learn-expert — Claude Code subagent: what it does

scikit-learn-expert — an Claude subagent for scikit-learn: preprocessing, feature selection, model comparison and hyperparameter tuning, with pipelines and cross-validation throughout.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/scikit-learn-expert.md
Open on GitHub

What scikit-learn-expert does

An Claude subagent for scikit-learn work: cleaning and encoding data, picking features, comparing estimators, tuning with GridSearchCV and RandomizedSearchCV, and reporting metrics for regression or classification. Ensembles, imbalanced classes and cross-validation are covered too.

The agent ships as a single markdown file. Its frontmatter carries the name and a description; the sections below it set focus areas, a working approach, a quality checklist and the expected output. The approach is firm about order. Understand the data first, split off a test set before any analysis, then scale and encode, validate with cross-validation, and compare every candidate against a baseline.

PEP 8 applies, and the checklist wants training, validation and test sets kept apart, so a script that fits on the whole dataset comes back for rework. Deliverables go beyond code: tuned hyperparameters, a model comparison with metrics, documented notebooks or scripts, and a saved model.pkl.

What it helps with

  • build a pipeline so preprocessing stays identical at fit and predict time
  • tune hyperparameters with GridSearchCV or RandomizedSearchCV
  • pick and justify metrics for a classification or regression task
  • compare candidate estimators against a baseline
  • work with imbalanced datasets

Example prompts for the agent

  • Build a pipeline for this table: scaling, categorical encoding, then an estimator. Tune it with GridSearchCV.
  • Compare three candidate models against a baseline using cross-validation, and justify the metrics you pick.
  • The classes are imbalanced. What should change in the approach, and how do we check it on a held-out set?

How to install scikit-learn-expert

Manually: put the files in place

.claude/agents/scikit-learn-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about scikit-learn-expert

How to install scikit-learn-expert in Claude Code?

Copy the subagent file to .claude/agents/scikit-learn-expert.md in your project.

What does scikit-learn-expert do?

It runs a scikit-learn workflow: preprocessing, feature selection, model comparison, hyperparameter tuning and metric evaluation. The step order lives inside the agent itself.

What do you get at the end?

A full pipeline, a model comparison with metrics, tuning results, documented notebooks or scripts, and a saved model.pkl.

Source text

scikit-learn-expert.md · MIT
---
name: scikit-learn-expert
description: Master scikit-learn for machine learning, focusing on model selection, feature engineering, and hyperparameter tuning. Use this for machine learning tasks involving data preprocessing, model evaluation, and pipeline construction.
model: claude-sonnet-4-20250514
---

## Focus Areas

- Data preprocessing and transformation techniques
- Feature engineering and selection methods
- Model selection and comparison
- Hyperparameter tuning with GridSearchCV and RandomizedSearchCV
- Evaluation metrics for regression and classification
- Building and validating pipelines
- Understanding and applying ensemble methods
- Handling imbalanced datasets
- Cross-validation techniques
- Interpreting model performance and outputs

## Approach

- Start with a clear understanding of the problem and dataset
- Choose appropriate preprocessing steps for scaling and encoding
- Split data into training and testing sets before any analysis
- Use cross-validation to ensure robustness of model evaluation
- Iterate on feature selection to identify the most predictive features
- Experiment with different models and hyperparameters systematically
- Evaluate models using appropriate metrics for the task
- Focus on minimizing overfitting through regularization and validation
- Document assumptions, findings, and decisions thoroughly
- Rely on scikit-learn's extensive documentation for advanced usage

## Quality Checklist

- Code follows PEP 8 guidelines
- Data is cleaned and preprocessed appropriately
- Features are scaled and/or transformed as necessary
- Models are trained, validated, and tested on separate data
- Hyperparameters are optimized using cross-validation
- Model evaluation metrics are clearly justified and reported
- Pipelines are constructed for reproducibility
- Code is modular with reusable components
- Results are compared with baseline models
- Insights and next steps are clearly communicated

## Output

- Preprocessed dataset ready for modeling
- Scikit-learn pipelines encapsulating complete workflow
- Well-documented Jupyter notebooks or scripts
- Comparison of different models and their performance metrics
- Hyperparameter tuning results and best model configuration
- Visualizations of model performance and data insights
- Comprehensive report or presentation summarizing the findings
- Recommendations based on model insights and understandings
- Clear documentation of methodology and codebase
- Readiness for deployment with model.pkl or similar artifacts

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for AI and ML →

From the same set137

The whole set →
loki-expert loki-expert — a Claude Code subagent for Loki deployment, log ingestion, LogQL queries, retention, caching, and Grafana integration. CX Codex ★ 1,029repo stars erlang-expert erlang-expert — a Claude subagent that reviews Erlang code: processes, OTP behaviours, supervision trees, hot upgrades. Useful when a node starts failing under load. CX Codex ★ 1,029repo stars haskell-expert haskell-expert — a subagent for writing idiomatic Haskell code. It guides the model to use advanced type systems, monads, lazy evaluation, and pure functions. CX Codex ★ 1,029repo stars langchain-expert The langchain-expert subagent helps build and debug LangChain pipelines, handle documents, use embeddings, and connect data sources. Use it for LangChain work. CX Codex ★ 1,029repo stars lua-expert lua-expert writes and optimizes idiomatic Lua code, configures metatables, and handles cooperative multitasking with coroutines. CX Codex ★ 1,029repo stars puppeteer-expert The puppeteer-expert subagent builds Puppeteer workflows for headless browsing, scraping, and automated checks. Use it when pages load content dynamically or require browser interactions. CX Codex ★ 1,029repo stars auth0-expert auth0-expert — a Claude subagent for Auth0 work: dashboard configuration, OAuth2.0 and OpenID Connect flows, social login, MFA, SSO, Rules and Hooks. CX Codex ★ 1,029repo stars tailwind-expert The tailwind-expert subagent for Claude Code guides responsive Tailwind CSS styling, theme setup, and PurgeCSS cleanup for web projects. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open