scikit-learn

Build classification, regression, and clustering models with scikit-learn pipelines in Python.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/listentomi/Orcajack --skill scikit-learn-listentomi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scikit-learn
Source: https://github.com/listentomi/Orcajack/tree/main/skills/science/scikit-learn
Command: npx skills add https://github.com/listentomi/Orcajack --skill scikit-learn-listentomi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scikit-learn, pandas, numpy, matplotlib, seaborn, and includes scripts (resource) and references (resource) components.

What problem does it solve? Applying classical machine learning correctly requires choosing the right algorithm, preprocessing data without leakage, tuning hyperparameters, and evaluating models rigorously. This Skill provides structured guidance and reference documentation for doing all of this with scikit-learn, avoiding common mistakes like data leakage and poor metric selection. ## Core Features & Use Cases - Supervised and Unsupervised Learning: Guidance for classification, regression, clustering, and dimensionality reduction algorithms including Random Forest, Gradient Boosting, SVM, K-Means, DBSCAN, and PCA. - Pipelines and Preprocessing: Patterns for ColumnTransformer, scaling, encoding, and imputation that prevent data leakage and keep workflows reproducible. - Model Evaluation and Tuning: Cross-validation strategies, GridSearchCV and RandomizedSearchCV, and metric selection for balanced and imbalanced data. - Use Case: Given a CSV with mixed numeric and categorical columns, build a full pipeline that imputes missing values, encodes categories, tunes a Gradient Boosting classifier with grid search, and reports precision, recall, and ROC AUC on a held-out test set. ## Quick Start Use the scikit-learn skill to build a classification pipeline with preprocessing and cross-validated hyperparameter tuning for my dataset.

Frequently Asked Questions about scikit-learn

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

FAQPage Schema
How do I build a machine learning pipeline in scikit-learn?▼

Combine preprocessing and an estimator using Pipeline, and use ColumnTransformer to apply different transformations to numeric and categorical columns. This prevents data leakage during cross-validation and keeps training and prediction consistent.

How to tune hyperparameters with GridSearchCV in scikit-learn?▼

Define a parameter grid with step-prefixed names like 'classifier__max_depth', then pass the pipeline and grid to GridSearchCV with a cv value such as 5. Call fit on training data and use best_estimator_ for predictions.

Which scikit-learn algorithms need feature scaling?▼

SVM, KNN, neural networks, PCA, regularized linear models, and K-Means require scaled features via StandardScaler or similar. Tree-based models like Random Forest and Gradient Boosting, plus Naive Bayes, do not require scaling.

Does scikit-learn handle missing values and categorical data?▼

Yes. Use SimpleImputer, KNNImputer, or IterativeImputer for missing values, and OneHotEncoder or OrdinalEncoder for categorical features. Place them inside a Pipeline so imputation statistics are learned only from training folds.

Why does my scikit-learn model overfit on test data?▼

Overfitting usually comes from insufficient regularization, no cross-validation, or preprocessing fitted on the full dataset. Add regularization such as Ridge alpha, evaluate with cross_val_score, and fit transformers only on training data.

When should I not use scikit-learn for machine learning?▼

scikit-learn targets classical ML on data that fits in memory; it is not designed for deep learning or GPU training. For very large datasets, use incremental learners like SGDClassifier or MiniBatchKMeans instead of batch algorithms.