Skip to content
secondsky avatar

Ml Model Training

Step-by-step ML training guide covering data prep, scikit-learn, PyTorch, and Keras with overfitting safeguards.

CCM score
50 of 100
skills.sh installs
487
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full training workflow: data preparation, feature engineering, model selection, training, and evaluation
  • Includes scikit-learn and PyTorch examples plus reference files for PyTorch loops and TensorFlow/Keras callbacks and TFLite export
  • Enforces leakage-safe scaling by fitting transformers on training data only, and reserves the test set for final evaluation
  • Designed for practitioners tuning classifiers and regressors who need guidance on overfitting, class imbalance, and reproducibility

Install

$ npx -y skills add secondsky/claude-skills --skill ml-model-training -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

ML Model Training

Train machine learning models with proper data handling and evaluation.

Training Workflow

  1. Data Preparation → 2. Feature Engineering → 3. Model Selection → 4. Training → 5. Evaluation

Data Preparation

import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, LabelEncoder

# Load and clean data
df = pd.read_csv('data.csv')
df = df.dropna()

# Encode categorical variables
le = LabelEncoder()
df['category'] = le.fit_transform(df['category'])

# Split data (70/15/15)
X = df.drop('target', axis=1)
y = df['target']
X_train, X_temp, y_train, y_temp = train_test_split(X, y, test_size=0.3)
X_val, X_test, y_val, y_test = train_test_split(X_temp, y_temp, test_size=0.5)

# Scale features
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_val = scaler.transform(X_val)
X_test = scaler.transform(X_test)

Scikit-learn Training

from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report, accuracy_score

model = RandomForestClassifier(n_estimators=100, random_state=42)
model.fit(X_train, y_train)

Details

Repository
github.com/secondsky/claude-skills
Categories
Data Science & Analytics, Python
First seen
Jun 3, 2026

Questions

What does the ml-model-training skill do?

ml-model-training guides an agent through training machine learning models with scikit-learn, PyTorch and TensorFlow. It covers data preparation, feature engineering, model selection, training and evaluation, plus classification, regression, neural networks and hyperparameter tuning.

How do I install the ml-model-training skill?

Run npx -y skills add secondsky/claude-skills --skill ml-model-training -y in your project to install ml-model-training. Once installed, the agent can use its guidance for training models and handling overfitting, underfitting and convergence issues.

Which skills lead the Data Science & Analytics category next to ml-model-training?

ml-model-training sits in the Data Science & Analytics category on Claude Marketplaces, where azure-kusto, analyze-project, run-train, explore-run and add-analytics-instrumentation are other top skills. Its distinct focus is training models and diagnosing overfitting and convergence problems in scikit-learn, PyTorch and TensorFlow.

What does ml-model-training need before I use it?

ml-model-training works with scikit-learn, PyTorch and TensorFlow, so those Python libraries need to be available in your project. Its examples also expect a CSV or similar dataset to load and split into training, validation and test sets.

More from secondsky/claude-skills

All 116

Similar to Ml Model Training

More Data Science & Analytics