Перейти к содержанию
Skillpedia
Машинное обучение51k · #3568

scikit-learn

Что он делает

Этот инструмент помогает создавать модели машинного обучения на Python. Он полезен для прогнозирования результатов, группировки похожих данных и упрощения сложной информации.

Когда использовать

  • ✓Когда нужно предсказать, купит ли клиент товар.
  • ✓Когда нужно разбить клиентов на группы по их покупательским привычкам.
  • ✓Когда нужно подготовить данные, чтобы ИИ-модель могла с ними работать.

Ссылка на скилл

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/scikit-learn/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/scikit-learn/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Как использовать scikit-learn, чтобы предсказать, каких клиентов мы потеряем?”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Инструмент использует алгоритмы машинного обучения, чтобы находить закономерности в данных. Вы передаёте примеры данных, а он учится делать прогнозы или находить похожие объекты.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

Scikit-learn

Overview

This skill provides comprehensive guidance for machine learning tasks using scikit-learn, the industry-standard Python library for classical machine learning. Use this skill for classification, regression, clustering, dimensionality reduction, preprocessing, model evaluation, and building production-ready ML pipelines.

Installation

Targets scikit-learn 1.9.1, verified with Python 3.13. The release requires Python 3.11+; use its published wheels for your interpreter/platform. See the 1.9 release notes. The bundled scripts and regression tests are executable examples. Reference snippets using caller-provided X, y, columns, or placeholders are illustrative adaptations, not complete standalone programs.

Install the PyPI package scikit-learn (not the deprecated sklearn package on PyPI). Import in code as sklearn.

# Install scikit-learn using uv
uv pip install "scikit-learn==1.9.1"

# Optional: plotting utilities and bundled script dependencies
uv pip install "scikit-learn[plots]==1.9.1" matplotlib pandas

# Commonly used with
uv pip install pandas numpy

Check your version:

import sklearn
print(sklearn.__version__)

When to Use This Skill

Use the scikit-learn skill when:

  • Building classification or regression models
  • Performing clustering or dimensionality reduction
  • Preprocessing and transforming data for machine learning
  • Evaluating model performance with cross-validation
  • Tuning hyperparameters with grid or random search
  • Creating ML pipelines for production workflows
  • Comparing different algorithms for a task
  • Working with both structured (tabular) and text data
  • Need interpretable, classical machine learning approaches

Quick Start

Classification Example

from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report

# Split data
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, stratify=y, random_state=42
)

# Preprocess
scaler = StandardScaler()
X_train_scaled = scaler.fit_transform(X_train)
X_test_scaled = scaler.transform(X_test)

# Train model
model = RandomForestClassifier(n_estimators=100, random_state=42)
model.fit(X_train_scaled, y_train)

# Evaluate
y_pred = model.predict(X_test_scaled)
print(classification_report(y_test, y_pred))

Complete Pipeline with Mixed Data

from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from sklearn.impute import SimpleImputer
from sklearn.ensemble import GradientBoostingClassifier

# Define feature types
numeric_features = ['age', 'income']
categorical_features = ['gender', 'occupation']

# Create preprocessing pipelines
numeric_transformer = Pipeline([
    ('imputer', SimpleImputer(strategy='median')),
    ('scaler', StandardScaler())
])

categorical_transformer = Pipeline([
    ('imputer', SimpleImputer(strategy='most_frequent')),
    ('onehot', OneHotEncoder(handle_unknown='ignore'))
])

# Combine transformers
preprocessor = ColumnTransformer([
    ('num', numeric_transformer, numeric_features),
    ('cat', categorical_transformer, categorical_features)
])

# Full pipeline
model = Pipeline([
    ('preprocessor', preprocessor),
    ('classifier', GradientBoostingClassifier(random_state=42))
])

# Fit and predict
model.fit(X_train, y_train)
y_pred = model.predict(X_test)

Core Capabilities

Five capability areas are documented in references/core_capabilities.md, with per-topic detail in references/supervised_learning.md, references/unsupervised_learning.md, references/model_evaluation.md, references/preprocessing.md, and references/pipelines_and_composition.md:

  1. Supervised learning — classification and regression estimator families.
  2. Unsupervised learning — clustering, decomposition, and manifold learning.
  3. Model evaluation and selection — metrics, cross-validation, and hyperparameter search.
  4. Data preprocessing — scaling, encoding, imputation, and feature selection.

…

Частые вопросы

Нужно ли что-то устанавливать?

Да, нужно установить библиотеку «scikit-learn» в вашу среду Python. В тексте описано, как это сделать, с помощью команды «uv pip install scikit-learn».

Что такое «классификация» и «регрессия»?

«Классификация» означает предсказание категории (например, «да» или «нет»). «Регрессия» означает предсказание числа (например, цены дома).

Что такое предобработка?

Это этап, на котором данные упорядочивают и очищают перед обучением ИИ-модели. Сюда входят, например, масштабирование чисел и преобразование текста в форму, которую модель может понять.

Подробности

Оригинальное описание автора

Supports machine learning in Python with scikit-learn. Applies when working with supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, hyperparameter tuning, preprocessing, or building ML pipelines. Provides comprehensive reference documentation for algorithms, preprocessing techniques, pipelines, and best practices.

repo: K-Dense-AI/scientific-agent-skills

Популярность

Звёзды на GitHub
51k
Место в рейтинге
#3568
Лицензия
MIT
Обновлён
15.10.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы