secondsky avatar

Ml Model Training

Handles the full ML training pipeline from data prep through evaluation with scikit-learn, PyTorch, and TensorFlow. The examples cover the essentials like proper train/val/test splits, feature scaling, and regularization techniques. What's actually useful here is the "Known Issues Prevention" section that walks through common mistakes like data leakage and ignoring class imbalance with concrete before/after code. The reference files go deeper on framework-specific patterns like PyTorch training loops with early stopping and Keras callbacks. Good for spinning up a model quickly or debugging why your validation metrics look suspicious.

skills.sh installs
474
GitHub stars
248
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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)

Sponsors

Details

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

More from secondsky/claude-skills

All 146
1pedronauck avatarreactpedronauck/skillsReact 19 development under the React Compiler. Use when writing React components or hooks, deciding whether a useMemo/useCallback/memo belongs in the code, diag473skills.sh installs
2product-on-purpose avatarfoundation-build-risk-reviewproduct-on-purpose/pm-skillsRuns a fast pre-build risk review on a product idea, feature request, or scope change, naming the single assumption most likely to make it fail and returning a 473skills.sh installs
3parcadei avatartddparcadei/continuous-claude-v3Test-driven development workflow with philosophy guide - plan → write tests → implement → validate472skills.sh installs
4kkoppenhaver avatarnano-bananakkoppenhaver/cc-nano-bananaREQUIRED for all image generation requests. Generate and edit images using Nano Banana (Gemini CLI). Handles blog featured images, YouTube thumbnails, icons, di471skills.sh installs
5inertia-rails avatarinertia-rails-testinginertia-rails/skillsTesting Inertia Rails responses with RSpec and Minitest: component assertions, prop matching, flash verification, deferred props, and partial reload helpers. Us470skills.sh installs
6jamesrochabrun avatarbook-illustratorjamesrochabrun/skillsExpert children's book illustrator guide with 2024-2025 best practices, focusing on age-appropriate styles, color theory, character design, and visual storytell468skills.sh installs