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/beita6969-scikit-learn-ml
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
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/scikit-learn-ml
What's inside
- Skill name
scikit-learn-ml- Description
- Machine learning with scikit-learn. Use when: classification, regression, clustering, dimensionality reduction, model evaluation, feature engineering. NOT for: deep learning (use transformers/pytorch), time series forecasting (use statsmodels), big data (use spark).
- License
- MIT
- Instructions
- 124 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Scikit-Learn Machine Learning
Classification, regression, clustering, dimensionality reduction, and model evaluation.
## When to Use / When NOT to Use
**Use when:** classification, regression, clustering, dimensionality reduction, model evaluation, feature engineering, hyperparameter tuning, pipeline construction.
**NOT for:** deep learning (use transformers/pytorch), time series forecasting (use statsmodels), big data that doesn't fit in memory (use spark), GPU-accelerated training.
## Data Preparation and Splitting
```python
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.preprocessing import StandardScaler, MinMaxScaler, LabelEncoder
df = pd.read_csv('data.csv')
X = df.drop(columns=['target'])
y = df['target']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=y)
scaler = StandardScaler() # zero mean, unit variance
X_train_scaled = scaler.fit_transform(X_train) # fit on train only
X_test_scaled = scaler.transform(X_test) # transform test with train stats
le = LabelEncoder()
y_encoded = le.fit_transform(y) # string labels to integers
```
## Classification
```python
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
from sklearn.svm import SVC
from sklearn.metrics import classification_report, confusion_matrix, roc_auc_score
clf = RandomForestClassifier(n_estimators=100, random_state=42)
clf.fit(X_train_scaled, y_train)
y_pred = clf.predict(X_test_scaled)
print(classification_report(y_test, y_pred))
print(confusion_matrix(y_test, y_pred))
y_proba = clf.predict_proba(X_test_scaled)[:, 1]
print(f"ROC AUC: {roc_auc_score(y_test, y_proba):.4f}")
# Alternatives
gb = GradientBoostingClassifier(n_estimators=200, learning_rate=0.1)
svc = SVC(kernel='rbf', probability=True)
```
## Regression
```python
from sklearn.linear_model import LinearRegression, Ridge, Lasso, ElasticNet
from sklearn.metrics import mean_squared_error, r2_score
reg = Ridge(alpha=1.0)
reg.fit(X_train_scaled, y_train)
y_pred = reg.predict(X_test_scaled)
print(f"RMSE: {np.sqrt(mean_squared_error(y_test, y_pred)):.4f}")
print(f"R2: {r2_score(y_test, y_pred):.4f}")
# ElasticNet combines L1+L2: ElasticNet(alpha=1.0, l1_ratio=0.5)
```
## Clustering
```python
from sklearn.cluster import KMeans, DBSCAN, AgglomerativeClustering
from sklearn.metrics import silhouette_score
km = KMeans(n_clusters=3, random_state=42, n_init=10)
labels = km.fit_predict(X_scaled)
print(f"Silhouette: {silhouette_score(X_scaled, labels):.4f}")
db = DBSCAN(eps=0.5, min_samples=5) # density-based, no k needed
agg = AgglomerativeClustering(n_clusters=3) # hierarchical
```
## Dimensionality Reduction
```python
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
pca = PCA(n_components=2)
X_pca = pca.fit_transform(X_scaled)
print(f"Explained variance: {pca.explained_variance_ratio_.sum():.2%}")
tsne = TSNE(n_components=2, perplexity=30, random_state=42)
X_tsne = tsne.fit_transform(X_scaled) # for visualization only
```
## Hyperparameter Tuning
```python
from sklearn.model_selection import GridSearchCV
param_grid = {'n_estimators': [100, 200], 'max_depth': [5, 10, None]}
grid = GridSearchCV(RandomForestClassifier(random_state=42),
param_grid, cv=5, scoring='f1_weighted', n_jobs=-1)
grid.fit(X_train_scaled, y_train)
print(f"Best params: {grid.best_params_}")
print(f"Best score: {grid.best_score_:.4f}")
# Cross-validation shortcut
scores = cross_val_score(clf, X_train_scaled, y_train, cv=5, scoring='accuracy')
print(f"CV Accuracy: {scores.mean():.4f} +/- {scores.std():.4f}")
```
## Best Practices
1. Always split data before any preprocessing; fit scalers on train set only.
2. Use `stratify=y` in `train_test_split` for imbalanced classification.
3. Set `random_state` for reproducibility in models, splits, and clustering.
4. Use `cross_val_score` or `GridSearchCV` instead of single train/test evaluation.From beita6969/ScienceClaw, MIT.
More from beita6969/ScienceClaw
- 0.608score
scienceclaw-benchmark-for51
beita6969
Use when a task asks to predict a phonon property of inorganic crystals from their structure, for example the frequency of the last peak of the phonon density…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for44
beita6969
Use when a task gives a covariate table plus, for each of many simulated observational datasets, a binary treatment vector and an outcome vector, and asks for…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for43
beita6969
Use when a task gives noisy OCR text of historical newspapers, periodicals or books (several languages, with metadata and a set of labelled OCR/ground-truth…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for34
beita6969
Use when predicting a binary molecular property such as HIV replication inhibition (OGB ogbg-molhiv, MoleculeNet-style activity) from SMILES strings and…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for42
beita6969
Use when a task gives hourly ICU records (vitals, labs, demographics, one stay per patient) with sepsis labels and asks for causal hour-by-hour sepsis alarms…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for33
beita6969
Use when forecasting day-ahead hourly electricity load of individual buildings (residential and commercial smart-meter data, BuildingsBench-style) from the…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for32
beita6969
Use when segmenting the hippocampus into anterior and posterior parts in small 3-D T1-weighted brain MRI crops (Medical Segmentation Decathlon Task04) from a…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for35
beita6969
Use when forecasting monthly tourism, visitor or other seasonal business and service series (Monash Tourism Monthly, 24-month horizon, period 12) from each…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark
beita6969
Index of the 23 discipline skills (FoR30-FoR52) that mirror the disciplines of the companion ScienceClaw-Eval benchmark: find which discipline skill fits a…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for30
beita6969
Use when segmenting top-down field or UAV RGB images of crops (sugar beet, PhenoBench-style) into soil / crop / weed semantics plus crop-plant and crop-leaf…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for31
beita6969
Use when ranking or predicting the fitness effect of single amino-acid substitutions in a protein (deep mutational scanning, ProteinGym-style assays) from…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for46
beita6969
Use when a task gives Python programming problems (a function stub with docstring or a task description, an entry-point name, a few public assert tests) and…
SkillAFreshness: A★ 1KClaude Code +9
Signals
- Stars
- 1,019
- Forks
- 109
- Open issues
- 1
- Last commit (this folder)
- Mar 12, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/beita6969/ScienceClaw
- Website
- scienceclaw.science
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from beita6969
- 0.608score
scienceclaw-benchmark
beita6969
Index of the 23 discipline skills (FoR30-FoR52) that mirror the disciplines of the companion ScienceClaw-Eval benchmark: find which discipline skill fits a…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for30
beita6969
Use when segmenting top-down field or UAV RGB images of crops (sugar beet, PhenoBench-style) into soil / crop / weed semantics plus crop-plant and crop-leaf…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for32
beita6969
Use when segmenting the hippocampus into anterior and posterior parts in small 3-D T1-weighted brain MRI crops (Medical Segmentation Decathlon Task04) from a…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for33
beita6969
Use when forecasting day-ahead hourly electricity load of individual buildings (residential and commercial smart-meter data, BuildingsBench-style) from the…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for34
beita6969
Use when predicting a binary molecular property such as HIV replication inhibition (OGB ogbg-molhiv, MoleculeNet-style activity) from SMILES strings and…
SkillAFreshness: A★ 1KClaude Code +9 - 0.608score
scienceclaw-benchmark-for35
beita6969
Use when forecasting monthly tourism, visitor or other seasonal business and service series (Monash Tourism Monthly, 24-month horizon, period 12) from each…
SkillAFreshness: A★ 1KClaude Code +9
Cite this page
scikit-learn-ml skill. Agent Mart. https://agentmart.dev/skills/beita6969-scikit-learn-ml (last updated 2026-10-24)