scikit-learn

Train and evaluate scikit-learn classification and regression models on structured data.

46|4|Updated Apr 8, 2023
One-click install
npx skills add https://github.com/CRAG666/dotfiles --skill scikit-learn-crag666
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scikit-learn
Source: https://github.com/CRAG666/dotfiles/tree/main/skills/scikit-learn
Command: npx skills add https://github.com/CRAG666/dotfiles --skill scikit-learn-crag666

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, matplotlib, scipy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

scikit-learn provides ready-to-use tools to train, evaluate, and improve machine learning models so you can go from raw data to validated predictions without reinventing core algorithms.

Core Features & Use Cases

  • Train supervised models for classification and regression with pipelines that keep preprocessing consistent, such as Logistic Regression, Random Forest, Gradient Boosting, SVMs, and MLPs.
  • Discover structure with unsupervised learning using clustering and dimensionality reduction methods like K-Means, DBSCAN, PCA, and t-SNE.
  • Evaluate and tune models correctly with cross-validation, grid/random search, and standard metrics to reduce overfitting and improve generalization on tabular datasets.

Quick Start

Use the scikit-learn references to build a pipeline that preprocesses numeric and categorical columns, trains a classifier, and reports test metrics for a supervised learning dataset.

Frequently Asked Questions about scikit-learn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a machine learning model on tabular data without data leakage?

To train machine learning models without data leakage, use deterministic pipelines that bundle supervised preprocessing and model training together. This ensures transformations like scaling or encoding fit only on training folds during cross-validation, keeping validation data isolated.

What's the best way to tune hyperparameters for a classification model?

The best way to tune hyperparameters for classification models is using grid or random search integrated with cross-validation. This approach systematically searches configurations while evaluating generalization on training folds to reduce overfitting and improve model performance.

How do I preprocess mixed numeric and categorical features for a regression pipeline?

Preprocess mixed numeric and categorical features for regression pipelines by applying dedicated preprocessing transformers within a unified workflow. This handles scaling for numeric columns and encoding for categorical columns simultaneously before model training.

Can I use scikit-learn for unsupervised clustering and dimensionality reduction?

Yes, you can use scikit-learn for unsupervised clustering and dimensionality reduction. It supports algorithms like K-Means and DBSCAN for clustering, alongside PCA and t-SNE for reducing feature dimensions on structured datasets.

Does this workflow support standard evaluation metrics for machine learning models?

Yes, the workflow supports standard evaluation metrics for machine learning models. It applies cross-validation and configurable search methods to calculate metrics for both classification and regression, ensuring reproducible model selection on tabular datasets.