Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/scikit-learn
Machine learning: clustering, PCA/t-SNE/UMAP, classification, prediction regression (Ridge/Lasso/ensemble), cross-validation, Pipelines. For unsupervised analysis, classification, or prediction. For econometric regression use pyfixest/statsmodels.
Passed 23 of 24 test cases with the skill, and 20 of 24 without it.
and 1 more in the full report
3 fixed21 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
In a machine learning workflow, LightGBM was used as the main classifier, but a single StandardScaler step from a helper library was included in the data pipeline. Should that helper library be listed in the software citations of the final report?
| Checked | Without skill | With skill |
|---|---|---|
| The response recommends omitting scikit-learn from citations when it is used solely for minor preprocessing. | Missed | Passed |
The instructions your model reads when the skill loads.
General-purpose machine learning with scikit-learn. Covers unsupervised methods (clustering, GMM, PCA, t-SNE, UMAP, manifold learning, evaluation metrics), supervised methods (classification, prediction-focused regression via Ridge/Lasso/ensemble methods, model evaluation, cross-validation), and shared infrastructure (preprocessing, Pipeline construction, feature selection). Use when performing cluster analysis, dimension reduction, classification, prediction-focused regression, or model evaluation in Python. For econometric regression (OLS, FE, IV, DiD), see pyfixest and statsmodels skills instead.
Comprehensive skill for machine learning in Python with scikit-learn. Covers unsupervised methods (clustering, decomposition, manifold learning), supervised methods (classification, regression), and shared infrastructure (preprocessing, pipelines, evaluation). Use decision trees below to find the right guidance, then load detailed references.
scikit-learn is the standard general-purpose machine learning library for Python:
fit() / predict() / transform() — learn once, apply everywhereThis skill targets scikit-learn 1.8.0. Notable changes in recent versions:
set_output(transform="pandas") for DataFrame output from transformers (1.2+)n_init="auto" default for KMeans (1.4+) — uses 10 for init="random", 1 for init="k-means++"Each topic in ./references/ contains focused documentation:
| File | Purpose | When to Read |
|---|---|---|
quickstart.md | Import patterns, fit/predict/transform API, Pipeline, train_test_split | First use of scikit-learn |
clustering.md | KMeans, AgglomerativeClustering, DBSCAN, HDBSCAN, SpectralClustering, OPTICS | Cluster analysis tasks |
mixture-models.md | GaussianMixture, BayesianGaussianMixture, BIC/AIC model selection | Model-based clustering, soft assignments |
decomposition.md | PCA, KernelPCA, TruncatedSVD, NMF, IncrementalPCA | Dimension reduction tasks |
manifold.md | t-SNE, UMAP (umap-learn), Isomap, LLE, MDS, SpectralEmbedding | Visualizing high-dimensional data |
evaluation-unsupervised.md | silhouette_score, Davies-Bouldin, Calinski-Harabasz, ARI, NMI, gap statistic | Validating cluster solutions |
preprocessing.md | StandardScaler, encoders, ColumnTransformer, Pipeline construction | Preparing data for ML |
classification.md | LogisticRegression, RandomForest, GradientBoosting, SVC, KNeighbors | Classification tasks |
regression-ml.md | Ridge, Lasso, ElasticNet, tree/ensemble regressors, SVR | ML regression (prediction-focused) |
test cases passed, vs 20 / 24 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.