machine-learning_skill

This skill helps you build, evaluate, and tune machine learning models using scikit-learn for classification, regression, and clustering.
  • Python

5

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill pluginagentmarketplace/custom-plugin-ai-data-scientist --skill machine-learning

  • SKILL.md4.9 KB

Overview

This skill provides practical tools and recipes for supervised and unsupervised machine learning using scikit-learn. It covers building, training, evaluating, and selecting models for classification, regression, and clustering. Use it to accelerate model development with ready patterns for pipelines, cross-validation, hyperparameter tuning, and feature engineering.

How this skill works

The skill supplies code patterns and guidance that walk through data splitting, model fitting, prediction, and evaluation using scikit-learn estimators. It includes examples for classification, regression, and clustering, plus utilities for scaling, encoding, pipelines, cross-validation, and GridSearch hyperparameter tuning. Results are validated with standard metrics and best-practice checks to avoid common pitfalls like data leakage and overfitting.

When to use it

  • Building a baseline or production-ready classifier or regressor quickly with scikit-learn
  • Comparing model families (linear, tree-based, boosting, SVM) to pick the right approach
  • Tuning hyperparameters and estimating generalization via cross-validation
  • Clustering data and selecting cluster count using the elbow method or density-based clustering
  • Creating reproducible pipelines that include preprocessing and modeling steps

Best practices

  • Split data into train/test before any preprocessing to prevent data leakage
  • Use cross-validation (k-fold) for reliable performance estimates and to tune hyperparameters
  • Scale features for distance-based methods (SVM, KMeans) and apply consistent transforms with Pipelines
  • Address class imbalance with class weights or resampling (SMOTE) and monitor class-wise metrics
  • Persist models and preprocessing objects (joblib/pickle) to reproduce production predictions

Example use cases

  • Train a RandomForest classifier with GridSearchCV and report weighted F1 and ROC-AUC
  • Fit a GradientBoostingRegressor, compute MAE and R², and compare against a linear baseline
  • Use KMeans with an elbow plot to choose k and assign cluster labels for customer segmentation
  • Build a Pipeline that scales features and trains a classifier to avoid manual transform errors
  • Apply cross_val_score to validate model stability across folds before deployment

FAQ

Start with a simple, interpretable baseline like logistic regression, then try tree-based models (Random Forest, XGBoost) for non-linear patterns.

How do I prevent data leakage?

Always split into train/test before preprocessing and incorporate transforms inside a Pipeline so fit/transform occurs only on training data during cross-validation.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
machine-learning skill by pluginagentmarketplace/custom-plugin-ai-data-scientist | VeilStrat