model-trainer
End-to-end machine learning model training for tabular data -- from baseline to optimized model with proper cross-validation, metric logging, and…
Skill by tezansahu
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/tezansahu-model-trainer
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, ml, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/model-trainer
What's inside
- Skill name
model-trainer- Description
- End-to-end machine learning model training for tabular data -- from baseline to optimized model with proper cross-validation, metric logging, and reproducibility. Trigger when the user asks to "train a model", "build a classifier", "build a regressor", "predict this column", "fit a model", "run ML on this data", "classification task", "regression task", or provides a dataset with a target variable and wants predictions. Also triggers on "compare models", "which algorithm is best", or "baseline model". Supports scikit-learn, XGBoost, LightGBM, and CatBoost.
- License
- GPL-3.0
- Instructions
- 161 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- metrics-guide.md · references/
SKILL.md (first lines)
# Model Trainer Train, evaluate, and compare ML models on tabular data with best-practice guardrails. --- ## Workflow ``` 1. Understand the task (classification vs regression, target column, metric) 2. Prepare data (split, encode, handle imbalance) 3. Train baseline model 4. Train advanced models 5. Compare and select best model 6. Save artifacts and report ``` --- ## Step 1 -- Understand the Task Determine from user input or data inspection: | Decision | How to detect | |---|---| | Classification vs Regression | Target dtype: categorical/bool/int with few unique values -> classification; continuous float -> regression | | Binary vs Multiclass | Unique values in target: 2 -> binary, >2 -> multiclass | | Evaluation metric | See `references/metrics-guide.md` | | Class imbalance | Value counts of target; flag if minority class < 20% | If ambiguous, ask the user. Default to the most common interpretation. --- ## Step 2 -- Data Preparation ### Train/Test Split - Use `train_test_split` with `test_size=0.2`, `random_state=42`, `stratify=y` (classification). - **Never touch the test set** until final evaluation. ### Preprocessing Pipeline Build a `sklearn.pipeline.Pipeline` or `ColumnTransformer`: | Column type | Transforms | |---|---| | Numeric | `SimpleImputer(strategy='median')` -> `StandardScaler()` | | Categorical (low cardinality <= 15) | `SimpleImputer(strategy='most_frequent')` -> `OneHotEncoder(handle_unknown='ignore')` | | Categorical (high cardinality > 15) | `OrdinalEncoder` or `TargetEncoder` (sklearn 1.3+) | | Text | Drop or use `TfidfVectorizer` if relevant | | DateTime | Extract year, month, day_of_week, hour as numeric features | ### Class Imbalance Handling (classification only) - Mild (20-40% minority): use `class_weight='balanced'` in the model. - Severe (<20% minority): use SMOTE from `imblearn` or stratified sampling. - Always use stratified CV splits. --- ## Step 3 -- Baseline Model Always start with a simple baseline: | Task | Baseline | |---|---| | Binary classification | `LogisticRegression(max_iter=1000, class_weight='balanced')` | | Multiclass classification | `LogisticRegression(max_iter=1000, multi_class='multinomial')` | | Regression | `Ridge(alpha=1.0)` | Evaluate with 5-fold cross-validation. Report mean +/- std of the primary metric. --- ## Step 4 -- Advanced Models Train these models (skip any whose library is not installed): | Model | Classification | Regression | |---|---|---| | Random Forest | `RandomForestClassifier(n_estimators=200, random_state=42)` | `RandomForestRegressor(n_estimators=200, random_state=42)` | | Gradient Boosting | `GradientBoostingClassifier()` | `GradientBoostingRegressor()` | | XGBoost | `XGBClassifier(n_estimators=200, use_label_encoder=False, eval_metric='logloss')` | `XGBRegressor(n_estimators=200)` | | LightGBM | `LGBMClassifier(n_estimators=200, verbose=-1)` | `LGBMRegressor(n_estimators=200, verbose=-1)` | Use the same cross-validation strategy as baseline. --- ## Step 5 -- Compare and Select Generate a comparison table: ``` | Model | CV Mean | CV Std | Train Score | Test Score | |---------------------|----------|--------|-------------|------------| | LogisticRegression | 0.842 | 0.012 | 0.851 | 0.838 | | RandomForest | 0.871 | 0.015 | 0.993 | 0.865 | | ... | ... | ... | ... | ... | ``` - Flag overfitting: Train Score >> Test Score (gap > 0.05). - Select model with best CV Mean on primary metric (break ties with lower std). - Re-train selected model on full training set, evaluate on held-out test set. - Generate classification report / regression error analysis on test set. For the best model, also produce: - **Feature importance** (built-in `.feature_importances_` or permutation importance). - **Confusion matrix** (classification) or **residual plot** (regression). --- ## Step 6 -- Save Artifacts ```python import joblib joblib.dump(best_pipeline, "model_artifacts/best_model.joblib") ``` Create `model_artifacts/` directory with: - `best_model.joblib` -- serialized pipeline (preprocessing + model)
From tezansahu/ai-garage, GPL-3.0.
More from tezansahu/ai-garage
- 0.605score
generate-structurizr-c4-diagram
tezansahu
Generate C4 software-architecture diagrams in Structurizr DSL from a codebase, folder(s), a description, docs, or an existing diagram, then render them in the…
SkillBFreshness: B★ 16Claude Code +9 - 0.605score
insight-extractor
tezansahu
Extract key, actionable insights from knowledge resources and save as structured markdown files in the knowledge/insights/ folder.
SkillBFreshness: B★ 16Claude Code +9 - 0.605score
arxiv-submission
tezansahu
Submit a paper to arXiv as a preprint.
SkillBFreshness: B★ 16Claude Code +9 - 0.602score
evaluate-skill-with-copilot-sdk
tezansahu
Evaluate a skill with the GitHub Copilot SDK — measure its triggering accuracy and compare its output quality against a no-skill baseline.
SkillBFreshness: B★ 16Claude Code +9 - 0.580score
skill-creator
tezansahu
Create new skills, modify and improve existing skills, and measure skill performance.
SkillBFreshness: B★ 16Claude Code +9 - 0.575score
tdd
tezansahu
Test-driven development.
SkillBFreshness: B★ 16Claude Code +9 - 0.572score
to-spec
tezansahu
Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
SkillBFreshness: B★ 16Claude Code +9 - 0.572score
to-tickets
tezansahu
Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker —…
SkillBFreshness: B★ 16Claude Code +9 - 0.564score
implement
tezansahu
Implement a piece of work based on a spec or set of tickets.
SkillBFreshness: B★ 16Claude Code +9 - 0.555score
stats-advisor
tezansahu
Recommend and execute the right statistical test for a given question, with plain-English interpretation.
SkillCFreshness: C★ 16Claude Code +9 - 0.555score
eda-autopilot
tezansahu
Perform comprehensive Exploratory Data Analysis on any tabular dataset (CSV, Parquet, Excel, or database table).
SkillCFreshness: C★ 16Claude Code +9 - 0.555score
llm-app-builder
tezansahu
Scaffold and build LLM-powered applications -- RAG pipelines, agentic workflows, structured output chains, tool-calling agents, and chatbot interfaces.
SkillCFreshness: C★ 16Claude Code +9
Signals
- Stars
- 16
- Forks
- 8
- Open issues
- 1
- Last commit (this folder)
- Jul 7, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- GPL-3.0
- Repository
- github.com/tezansahu/ai-garage
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from tezansahu
- 0.605score
generate-structurizr-c4-diagram
tezansahu
Generate C4 software-architecture diagrams in Structurizr DSL from a codebase, folder(s), a description, docs, or an existing diagram, then render them in the…
SkillBFreshness: B★ 16Claude Code +9 - 0.605score
insight-extractor
tezansahu
Extract key, actionable insights from knowledge resources and save as structured markdown files in the knowledge/insights/ folder.
SkillBFreshness: B★ 16Claude Code +9 - 0.605score
arxiv-submission
tezansahu
Submit a paper to arXiv as a preprint.
SkillBFreshness: B★ 16Claude Code +9 - 0.602score
evaluate-skill-with-copilot-sdk
tezansahu
Evaluate a skill with the GitHub Copilot SDK — measure its triggering accuracy and compare its output quality against a no-skill baseline.
SkillBFreshness: B★ 16Claude Code +9 - 0.580score
skill-creator
tezansahu
Create new skills, modify and improve existing skills, and measure skill performance.
SkillBFreshness: B★ 16Claude Code +9 - 0.575score
tdd
tezansahu
Test-driven development.
SkillBFreshness: B★ 16Claude Code +9
Cite this page
model-trainer skill. Agent Mart. https://agentmart.dev/skills/tezansahu-model-trainer (last updated 2026-10-24)