[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73JBV2H4VZXC8XCMJVKPFKQ":3,"skill-same:01M73JBV2H4VZXC8XCMJVKPFKQ":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M73JBV2H4VZXC8XCMJVKPFKQ","scikit-learn-machine-learning",null,"Classical ML in Python: classification, regression, clustering, dim reduction, evaluation, tuning, preprocessing pipelines. Linear models, tree ensembles, SVMs, K-Means, PCA, t-SNE. Use PyTorch\u002FTF for deep learning; XGBoost\u002FLightGBM for scale.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"BSD-3-Clause","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fscikit-learn-machine-learning\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: \"scikit-learn-machine-learning\"\ndescription: \"Classical ML in Python: classification, regression, clustering, dim reduction, evaluation, tuning, preprocessing pipelines. Linear models, tree ensembles, SVMs, K-Means, PCA, t-SNE. Use PyTorch\u002FTF for deep learning; XGBoost\u002FLightGBM for scale.\"\nlicense: \"BSD-3-Clause\"\n---\n\n# scikit-learn\n\n## Overview\n\nscikit-learn is the standard Python library for classical machine learning. It provides consistent APIs for supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, and preprocessing, with seamless integration into NumPy\u002Fpandas workflows.\n\n## When to Use\n\n- Building classification models for labeled data (spam detection, disease diagnosis, species identification)\n- Predicting continuous outcomes with regression (price prediction, dose-response modeling)\n- Clustering unlabeled data into groups (patient stratification, gene expression clusters)\n- Reducing dimensionality for visualization or feature engineering (PCA, t-SNE on multi-omics data)\n- Evaluating and comparing model performance with cross-validation\n- Tuning hyperparameters systematically (grid search, random search)\n- Building reproducible ML pipelines with preprocessing and modeling steps\n- For deep learning tasks (images, NLP), use `pytorch` or `transformers` instead\n- For large-scale gradient boosting, use `xgboost` or `lightgbm` instead\n\n## Prerequisites\n\n- **Python packages**: `scikit-learn`, `numpy`, `pandas`\n- **Optional**: `matplotlib`, `seaborn` for visualization\n- **Data**: Tabular data as NumPy arrays or pandas DataFrames\n\n```bash\npip install scikit-learn numpy pandas matplotlib seaborn\n```\n\n## Quick Start\n\n```python\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score, classification_report\nfrom sklearn.datasets import load_breast_cancer\n\n# Load dataset, split, train, evaluate in 10 lines\nX, y = load_breast_cancer(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nclf = RandomForestClassifier(n_estimators=100, random_state=42)\nclf.fit(X_train, y_train)\ny_pred = clf.predict(X_test)\n\nprint(f\"Accuracy: {accuracy_score(y_test, y_pred):.3f}\")\nprint(classification_report(y_test, y_pred, target_names=[\"malignant\", \"benign\"]))\n```\n\n## Core API\n\n### Module 1: Data Preprocessing\n\nScaling, encoding, imputation, and feature engineering.\n\n```python\nfrom sklearn.preprocessing import StandardScaler, MinMaxScaler, OneHotEncoder\nfrom sklearn.impute import SimpleImputer\nimport numpy as np\n\n# Scaling: zero mean, unit variance\nX = np.array([[1, 2], [3, 4], [5, 6]])\nscaler = StandardScaler()\nX_scaled = scaler.fit_transform(X)\nprint(f\"Mean: {X_scaled.mean(axis=0)}, Std: {X_scaled.std(axis=0)}\")\n# Mean: [0. 0.], Std: [1. 1.]\n\n# Imputation: fill missing values\nX_missing = np.array([[1, np.nan], [3, 4], [np.nan, 6]])\nimputer = SimpleImputer(strategy=\"median\")\nX_filled = imputer.fit_transform(X_missing)\nprint(f\"Filled:\\n{X_filled}\")\n```\n\n```python\nfrom sklearn.preprocessing import OneHotEncoder, OrdinalEncoder, LabelEncoder\n\n# One-hot encoding for nominal categories\nenc = OneHotEncoder(sparse_output=False, handle_unknown=\"ignore\")\nX_cat = np.array([[\"red\"], [\"blue\"], [\"green\"], [\"red\"]])\nX_encoded = enc.fit_transform(X_cat)\nprint(f\"Categories: {enc.categories_}\")\nprint(f\"Encoded shape: {X_encoded.shape}\")  # (4, 3)\n```\n\n### Module 2: Supervised Learning — Classification\n\nClassifiers for discrete target prediction.\n\n```python\nfrom sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.svm import SVC\nfrom sklearn.datasets import load_iris\nfrom sklearn.model_selection import train_test_split\n\nX, y = load_iris(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, stratify=y, random_state=42)\n\n# Compare classifiers\nclassifiers = {\n    \"LogisticRegression\": LogisticRegression(max_iter=200),\n    \"RandomForest\": RandomForestClassifier(n_estimators=100, random_state=42),\n    \"SVM\": SVC(kernel=\"rbf\", C=1.0),\n    \"GradientBoosting\": GradientBoostingClassifier(n_estimators=100, random_state=42),\n}\nfor name, clf in classifiers.items():\n    clf.fit(X_train, y_train)\n    print(f\"{name}: accuracy = {clf.score(X_test, y_test):.3f}\")\n```\n\n### Module 3: Supervised Learning — Regression\n\nRegressors for continuous target prediction.\n\n```python\nfrom sklearn.linear_model import LinearRegression, Ridge, Lasso, ElasticNet\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.datasets import make_regression\nfrom sklearn.metrics import mean_squared_error, r2_score\n\nX, y = make_regression(n_samples=200, n_features=10, noise=10, random_state=42)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nmodels = {\n    \"Linear\": LinearRegression(),\n    \"Ridge\": Ridge(alpha=1.0),\n    \"Lasso\": Lasso(alpha=0.1),\n    \"RandomForest\": RandomForestRegressor(n_estimators=100, random_state=42),\n}\nfor name, model in models.items():\n    model.fit(X_train, y_train)\n    y_pred = model.predict(X_test)\n    print(f\"{name}: RMSE={mean_squared_error(y_test, y_pred, squared=False):.2f}, R²={r2_score(y_test, y_pred):.3f}\")\n```\n\n### Module 4: Unsupervised Learning — Clustering\n\nClustering algorithms for unlabeled data.\n\n```python\nfrom sklearn.cluster import KMeans, DBSCAN, AgglomerativeClustering\nfrom sklearn.metrics import silhouette_score\nfrom sklearn.datasets import make_blobs\n\nX, y_true = make_blobs(n_samples=300, centers=4, random_state=42)\n\n# K-Means with elbow method\nfor k in [2, 3, 4, 5, 6]:\n    km = KMeans(n_clusters=k, random_state=42, n_init=10)\n    labels = km.fit_predict(X)\n    sil = silhouette_score(X, labels)\n    print(f\"k={k}: silhouette={sil:.3f}, inertia={km.inertia_:.1f}\")\n```\n\n```python\n# DBSCAN — no need to specify k\nfrom sklearn.cluster import DBSCAN\n\ndb = DBSCAN(eps=0.5, min_samples=5)\nlabels = db.fit_predict(X)\nn_clusters = len(set(labels)) - (1 if -1 in labels else 0)\nn_noise = (labels == -1).sum()\nprint(f\"DBSCAN: {n_clusters} clusters, {n_noise} noise points\")\n```\n\n### Module 5: Dimensionality Reduction\n\nPCA, t-SNE, and other methods for visualization and feature reduction.\n\n```python\nfrom sklearn.decomposition import PCA\nfrom sklearn.manifold import TSNE\nfrom sklearn.datasets import load_digits\n\nX, y = load_digits(return_X_y=True)\nprint(f\"Original shape: {X.shape}\")  # (1797, 64)\n\n# PCA — preserve 95% variance\npca = PCA(n_components=0.95)\nX_pca = pca.fit_transform(X)\nprint(f\"PCA: {X_pca.shape[1]} components, explained variance: {pca.explained_variance_ratio_.sum():.3f}\")\n\n# t-SNE — 2D visualization\ntsne = TSNE(n_components=2, perplexity=30, random_state=42)\nX_tsne = tsne.fit_transform(X)\nprint(f\"t-SNE shape: {X_tsne.shape}\")  # (1797, 2)\n```\n\n### Module 6: Model Evaluation & Selection\n\nCross-validation, metrics, hyperparameter tuning.\n\n```python\nfrom sklearn.model_selection import cross_val_score, GridSearchCV, StratifiedKFold\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import classification_report, confusion_matrix\nfrom sklearn.datasets import load_iris\n\nX, y = load_iris(return_X_y=True)\n\n# Cross-validation\nclf = RandomForestClassifier(n_estimators=100, random_state=42)\nscores = cross_val_score(clf, X, y, cv=StratifiedKFold(5), scoring=\"accuracy\")\nprint(f\"CV accuracy: {scores.mean():.3f} ± {scores.std():.3f}\")\n```\n\n```python\n# Hyperparameter tuning with GridSearchCV\nparam_grid = {\n    \"n_estimators\": [50, 100, 200],\n    \"max_depth\": [5, 10, None],\n    \"min_samples_split\": [2, 5]\n}\ngrid = GridSearchCV(\n    RandomForestClassifier(random_state=42),\n    param_grid, cv=5, scoring=\"accuracy\", n_jobs=-1\n)\ngrid.fit(X, y)\nprint(f\"Best params: {grid.best_params_}\")\nprint(f\"Best score: {grid.best_score_:.3f}\")\n```\n\n### Module 7: Pipelines\n\nChain preprocessing and models; prevent data leakage.\n\n```python\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.preprocessing import StandardScaler, OneHotEncoder\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.ensemble import GradientBoostingClassifier\n\n# Mixed-type preprocessing\nnumeric_features = [\"age\", \"income\"]\ncategorical_features = [\"gender\", \"occupation\"]\n\npreprocessor = ColumnTransformer([\n    (\"num\", Pipeline([\n        (\"imputer\", SimpleImputer(strategy=\"median\")),\n        (\"scaler\", StandardScaler())\n    ]), numeric_features),\n    (\"cat\", Pipeline([\n        (\"imputer\", SimpleImputer(strategy=\"most_frequent\")),\n        (\"onehot\", OneHotEncoder(handle_unknown=\"ignore\"))\n    ]), categorical_features),\n])\n\npipe = Pipeline([\n    (\"preprocessor\", preprocessor),\n    (\"classifier\", GradientBoostingClassifier(random_state=42))\n])\n# pipe.fit(X_train, y_train); pipe.predict(X_test)\nprint(\"Pipeline steps:\", [name for name, _ in pipe.steps])\n```\n\n## Common Workflows\n\n### Workflow 1: End-to-End Classification\n\n**Goal**: Complete classification workflow from data loading to evaluation.\n\n```python\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split, cross_val_score\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import classification_report\nfrom sklearn.datasets import load_breast_cancer\n\n# Load data\nX, y = load_breast_cancer(return_X_y=True, as_frame=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, stratify=y, random_state=42)\n\n# Build pipeline\npipe = Pipeline([\n    (\"scaler\", StandardScaler()),\n    (\"clf\", RandomForestClassifier(n_estimators=200, random_state=42))\n])\n\n# Cross-validate\ncv_scores = cross_val_score(pipe, X_train, y_train, cv=5, scoring=\"f1\")\nprint(f\"CV F1: {cv_scores.mean():.3f} ± {cv_scores.std():.3f}\")\n\n# Final evaluation\npipe.fit(X_train, y_train)\ny_pred = pipe.predict(X_test)\nprint(classification_report(y_test, y_pred))\n```\n\n### Workflow 2: Clustering with Visualization\n\n**Goal**: Cluster data and visualize with dimensionality reduction.\n\n```python\nfrom sklearn.datasets import make_blobs\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.cluster import KMeans\nfrom sklearn.decomposition import PCA\nfrom sklearn.metrics import silhouette_score\nimport matplotlib.pyplot as plt\n\n# Generate and scale data\nX, _ = make_blobs(n_samples=500, centers=4, random_state=42)\nX_scaled = StandardScaler().fit_transform(X)\n\n# Cluster\nkm = KMeans(n_clusters=4, random_state=42, n_init=10)\nlabels = km.fit_predict(X_scaled)\nprint(f\"Silhouette: {silhouette_score(X_scaled, labels):.3f}\")\n\n# Visualize\nX_2d = PCA(n_components=2).fit_transform(X_scaled)\nplt.scatter(X_2d[:, 0], X_2d[:, 1], c=labels, cmap=\"viridis\", s=20, alpha=0.7)\nplt.title(\"K-Means Clustering (PCA projection)\")\nplt.savefig(\"clustering_result.png\", dpi=150, bbox_inches=\"tight\")\nprint(\"Saved clustering_result.png\")\n```\n\n### Workflow 3: Feature Selection + Model Pipeline\n\n**Goal**: Select best features and build a tuned model.\n\n```python\nfrom sklearn.datasets import make_classification\nfrom sklearn.feature_selection import SelectKBest, f_classif\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.svm import SVC\nfrom sklearn.model_selection import GridSearchCV\n\nX, y = make_classification(n_samples=500, n_features=50, n_informative=10, random_state=42)\n\npipe = Pipeline([\n    (\"scaler\", StandardScaler()),\n    (\"selector\", SelectKBest(f_classif)),\n    (\"svm\", SVC(kernel=\"rbf\"))\n])\n\nparam_grid = {\n    \"selector__k\": [5, 10, 20],\n    \"svm__C\": [0.1, 1, 10],\n    \"svm__gamma\": [\"scale\", \"auto\"]\n}\n\ngrid = GridSearchCV(pipe, param_grid, cv=5, scoring=\"accuracy\", n_jobs=-1)\ngrid.fit(X, y)\nprint(f\"Best params: {grid.best_params_}\")\nprint(f\"Best accuracy: {grid.best_score_:.3f}\")\n```\n\n## Key Parameters\n\n| Parameter | Module | Default | Range \u002F Options | Effect |\n|-----------|--------|---------|-----------------|--------|\n| `n_estimators` | RandomForest, GradientBoosting | `100` | `50`-`1000` | Number of trees; higher = better but slower |\n| `max_depth` | Tree-based models | `None` | `1`-`50`, `None` | Tree depth; `None` = no limit (can overfit) |\n| `C` | SVM, LogisticRegression | `1.0` | `0.001`-`1000` | Regularization strength (inverse); lower = more regularization |\n| `alpha` | Ridge, Lasso | `1.0` | `0.001`-`100` | Regularization strength; higher = more regularization |\n| `n_clusters` | KMeans | required | `2`-`N` | Number of clusters to form |\n| `eps` | DBSCAN | `0.5` | `0.01`-`10` | Neighborhood radius; smaller = more clusters |\n| `n_components` | PCA | required | `1`-`N` or `0.0`-`1.0` | Components to keep; float = variance ratio |\n| `perplexity` | t-SNE | `30` | `5`-`50` | Balance local\u002Fglobal structure |\n| `cv` | GridSearchCV | `5` | `2`-`10` | Cross-validation folds |\n| `scoring` | GridSearchCV, cross_val_score | varies | `accuracy`, `f1`, `roc_auc`, etc. | Evaluation metric |\n\n## Common Recipes\n\n### Recipe: Feature Importance Analysis\n\nWhen to use: Understanding which features drive model predictions.\n\n```python\nimport numpy as np\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.datasets import load_iris\n\nX, y = load_iris(return_X_y=True)\nclf = RandomForestClassifier(n_estimators=200, random_state=42).fit(X, y)\n\nimportances = clf.feature_importances_\nindices = np.argsort(importances)[::-1]\nfeature_names = load_iris().feature_names\nfor i in range(X.shape[1]):\n    print(f\"{feature_names[indices[i]]}: {importances[indices[i]]:.4f}\")\n```\n\n### Recipe: Learning Curve Diagnosis\n\nWhen to use: Diagnosing overfitting vs underfitting.\n\n```python\nfrom sklearn.model_selection import learning_curve\nimport matplotlib.pyplot as plt\nimport numpy as np\n\ntrain_sizes, train_scores, val_scores = learning_curve(\n    clf, X, y, cv=5, train_sizes=np.linspace(0.1, 1.0, 10), scoring=\"accuracy\"\n)\nplt.plot(train_sizes, train_scores.mean(axis=1), label=\"Train\")\nplt.plot(train_sizes, val_scores.mean(axis=1), label=\"Validation\")\nplt.xlabel(\"Training size\"); plt.ylabel(\"Accuracy\"); plt.legend()\nplt.savefig(\"learning_curve.png\", dpi=150, bbox_inches=\"tight\")\nprint(\"Saved learning_curve.png\")\n```\n\n### Recipe: Save and Load Models\n\nWhen to use: Persisting trained models for later use.\n\n```python\nimport joblib\n\n# Save\njoblib.dump(pipe, \"model_pipeline.joblib\")\nprint(\"Model saved to model_pipeline.joblib\")\n\n# Load\nloaded_pipe = joblib.load(\"model_pipeline.joblib\")\ny_pred = loaded_pipe.predict(X_test)\nprint(f\"Loaded model predictions: {y_pred[:5]}\")\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `ConvergenceWarning` | Model didn't converge | Increase `max_iter` (e.g., 1000) or scale features with `StandardScaler` |\n| High train accuracy, low test accuracy | Overfitting | Add regularization, reduce `max_depth`, use cross-validation |\n| `ValueError: unknown categories` | New categories in test data | Use `OneHotEncoder(handle_unknown='ignore')` |\n| `MemoryError` with large data | Full dataset in memory | Use `SGDClassifier`\u002F`MiniBatchKMeans` for incremental learning |\n| Poor clustering results | Unscaled features or wrong k | Scale features first; use silhouette score to find optimal k |\n| `NotFittedError` | Predict before fit | Call `model.fit(X_train, y_train)` first |\n| Different results each run | Missing `random_state` | Set `random_state=42` in model and `train_test_split` |\n| Slow GridSearchCV | Large parameter grid | Use `RandomizedSearchCV` or `HalvingGridSearchCV`; add `n_jobs=-1` |\n\n## References\n\n- [scikit-learn User Guide](https:\u002F\u002Fscikit-learn.org\u002Fstable\u002Fuser_guide.html) — official documentation\n- [scikit-learn API Reference](https:\u002F\u002Fscikit-learn.org\u002Fstable\u002Fapi\u002Findex.html) — complete API\n- [scikit-learn Examples Gallery](https:\u002F\u002Fscikit-learn.org\u002Fstable\u002Fauto_examples\u002F) — tutorials\n- Pedregosa et al. (2011). Scikit-learn: Machine Learning in Python. *JMLR* 12:2825-2830.\n","# scikit-learn\n\n## Overview\n\nscikit-learn is the standard Python library for classical machine learning. It provides consistent APIs for supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, and preprocessing, with seamless integration into NumPy\u002Fpandas workflows.\n\n## When to Use\n\n- Building classification models for labeled data (spam detection, disease diagnosis, species identification)\n- Predicting continuous outcomes with regression (price prediction, dose-response modeling)\n- Clustering unlabeled data into groups (patient stratification, gene expression clusters)\n- Reducing dimensionality for visualization or feature engineering (PCA, t-SNE on multi-omics data)\n- Evaluating and comparing model performance with cross-validation\n- Tuning hyperparameters systematically (grid search, random search)\n- Building reproducible ML pipelines with preprocessing and modeling steps\n- For deep learning tasks (images, NLP), use `pytorch` or `transformers` instead\n- For large-scale gradient boosting, use `xgboost` or `lightgbm` instead\n\n## Prerequisites\n\n- **Python packages**: `scikit-learn`, `numpy`, `pandas`\n- **Optional**: `matplotlib`, `seaborn` for visualization\n- **Data**: Tabular data as NumPy arrays or pandas DataFrames\n\n```bash\npip install scikit-learn numpy pandas matplotlib seaborn\n```\n\n## Quick Start\n\n```python\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score, classification_report\nfrom sklearn.datasets import load_breast_cancer\n\n# Load dataset, split, train, evaluate in 10 lines\nX, y = load_breast_cancer(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nclf = RandomForestClassifier(n_estimators=100, random_state=42)\nclf.fit(X_train, y_train)\ny_pred = clf.predict(X_test)\n\nprint(f\"Accuracy: {accuracy_score(y_test, y_pred):.3f}\")\nprint(classification_report(y_test, y_pred, target_names=[\"malignant\", \"benign\"]))\n```\n\n## Core API\n\n### Module 1: Data Preprocessing\n\nScaling, encoding, imputation, and feature engineering.\n\n```python\nfrom sklearn.preprocessing import StandardScaler, MinMaxScaler, OneHotEncoder\nfrom sklearn.impute import SimpleImputer\nimport numpy as np\n\n# Scaling: zero mean, unit variance\nX = np.array([[1, 2], [3, 4], [5, 6]])\nscaler = StandardScaler()\nX_scaled = scaler.fit_transform(X)\nprint(f\"Mean: {X_scaled.mean(axis=0)}, Std: {X_scaled.std(axis=0)}\")\n# Mean: [0. 0.], Std: [1. 1.]\n\n# Imputation: fill missing values\nX_missing = np.array([[1, np.nan], [3, 4], [np.nan, 6]])\nimputer = SimpleImputer(strategy=\"median\")\nX_filled = imputer.fit_transform(X_missing)\nprint(f\"Filled:\\n{X_filled}\")\n```\n\n```python\nfrom sklearn.preprocessing import OneHotEncoder, OrdinalEncoder, LabelEncoder\n\n# One-hot encoding for nominal categories\nenc = OneHotEncoder(sparse_output=False, handle_unknown=\"ignore\")\nX_cat = np.array([[\"red\"], [\"blue\"], [\"green\"], [\"red\"]])\nX_encoded = enc.fit_transform(X_cat)\nprint(f\"Categories: {enc.categories_}\")\nprint(f\"Encoded shape: {X_encoded.shape}\")  # (4, 3)\n```\n\n### Module 2: Supervised Learning — Classification\n\nClassifiers for discrete target prediction.\n\n```python\nfrom sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.svm import SVC\nfrom sklearn.datasets import load_iris\nfrom sklearn.model_selection import train_test_split\n\nX, y = load_iris(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, stratify=y, random_state=42)\n\n# Compare classifiers\nclassifiers = {\n    \"LogisticRegression\": LogisticRegression(max_iter=200),\n    \"RandomForest\": RandomForestClassifier(n_estimators=100, random_state=42),\n    \"SVM\": SVC(kernel=\"rbf\", C=1.0),\n    \"GradientBoosting\": GradientBoostingClassifier(n_estimators=100, random_state=42),\n}\nfor name, clf in classifiers.items():\n    clf.fit(X_train, y_train)\n    print(f\"{name}: accuracy = {clf.score(X_test, y_test):.3f}\")\n```\n\n### Module 3: Supervised Learning — Regression\n\nRegressors for continuous target prediction.\n\n```python\nfrom sklearn.linear_model import LinearRegression, Ridge, Lasso, ElasticNet\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.datasets import make_regression\nfrom sklearn.metrics import mean_squared_error, r2_score\n\nX, y = make_regression(n_samples=200, n_features=10, noise=10, random_state=42)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nmodels = {\n    \"Linear\": LinearRegression(),\n    \"Ridge\": Ridge(alpha=1.0),\n    \"Lasso\": Lasso(alpha=0.1),\n    \"RandomForest\": RandomForestRegressor(n_estimators=100, random_state=42),\n}\nfor name, model in models.items():\n    model.fit(X_train, y_train)\n    y_pred = model.predict(X_test)\n    print(f\"{name}: RMSE={mean_squared_error(y_test, y_pred, squared=False):.2f}, R²={r2_score(y_test, y_pred):.3f}\")\n```\n\n### Module 4: Unsupervised Learning — Clustering\n\nClustering algorithms for unlabeled data.\n\n```python\nfrom sklearn.cluster import KMeans, DBSCAN, AgglomerativeClustering\nfrom sklearn.metrics import silhouette_score\nfrom sklearn.datasets import make_blobs\n\nX, y_true = make_blobs(n_samples=300, centers=4, random_state=42)\n\n# K-Means with elbow method\nfor k in [2, 3, 4, 5, 6]:\n    km = KMeans(n_clusters=k, random_state=42, n_init=10)\n    labels = km.fit_predict(X)\n    sil = silhouette_score(X, labels)\n    print(f\"k={k}: silhouette={sil:.3f}, inertia={km.inertia_:.1f}\")\n```\n\n```python\n# DBSCAN — no need to specify k\nfrom sklearn.cluster import DBSCAN\n\ndb = DBSCAN(eps=0.5, min_samples=5)\nlabels = db.fit_predict(X)\nn_clusters = len(set(labels)) - (1 if -1 in labels else 0)\nn_noise = (labels == -1).sum()\nprint(f\"DBSCAN: {n_clusters} clusters, {n_noise} noise points\")\n```\n\n### Module 5: Dimensionality Reduction\n\nPCA, t-SNE, and other methods for visualization and feature reduction.\n\n```python\nfrom sklearn.decomposition import PCA\nfrom sklearn.manifold import TSNE\nfrom sklearn.datasets import load_digits\n\nX, y = load_digits(return_X_y=True)\nprint(f\"Original shape: {X.shape}\")  # (1797, 64)\n\n# PCA — preserve 95% variance\npca = PCA(n_components=0.95)\nX_pca = pca.fit_transform(X)\nprint(f\"PCA: {X_pca.shape[1]} components, explained variance: {pca.explained_variance_ratio_.sum():.3f}\")\n\n# t-SNE — 2D visualization\ntsne = TSNE(n_components=2, perplexity=30, random_state=42)\nX_tsne = tsne.fit_transform(X)\nprint(f\"t-SNE shape: {X_tsne.shape}\")  # (1797, 2)\n```\n\n### Module 6: Model Evaluation & Selection\n\nCross-validation, metrics, hyperparameter tuning.\n\n```python\nfrom sklearn.model_selection import cross_val_score, GridSearchCV, StratifiedKFold\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import classification_report, confusion_matrix\nfrom sklearn.datasets import load_iris\n\nX, y = load_iris(return_X_y=True)\n\n# Cross-validation\nclf = RandomForestClassifier(n_estimators=100, random_state=42)\nscores = cross_val_score(clf, X, y, cv=StratifiedKFold(5), scoring=\"accuracy\")\nprint(f\"CV accuracy: {scores.mean():.3f} ± {scores.std():.3f}\")\n```\n\n```python\n# Hyperparameter tuning with GridSearchCV\nparam_grid = {\n    \"n_estimators\": [50, 100, 200],\n    \"max_depth\": [5, 10, None],\n    \"min_samples_split\": [2, 5]\n}\ngrid = GridSearchCV(\n    RandomForestClassifier(random_state=42),\n    param_grid, cv=5, scoring=\"accuracy\", n_jobs=-1\n)\ngrid.fit(X, y)\nprint(f\"Best params: {grid.best_params_}\")\nprint(f\"Best score: {grid.best_score_:.3f}\")\n```\n\n### Module 7: Pipelines\n\nChain preprocessing and models; prevent data leakage.\n\n```python\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.preprocessing import StandardScaler, OneHotEncoder\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.ensemble import GradientBoostingClassifier\n\n# Mixed-type preprocessing\nnumeric_features = [\"age\", \"income\"]\ncategorical_features = [\"gender\", \"occupation\"]\n\npreprocessor = ColumnTransformer([\n    (\"num\", Pipeline([\n        (\"imputer\", SimpleImputer(strategy=\"median\")),\n        (\"scaler\", StandardScaler())\n    ]), numeric_features),\n    (\"cat\", Pipeline([\n        (\"imputer\", SimpleImputer(strategy=\"most_frequent\")),\n        (\"onehot\", OneHotEncoder(handle_unknown=\"ignore\"))\n    ]), categorical_features),\n])\n\npipe = Pipeline([\n    (\"preprocessor\", preprocessor),\n    (\"classifier\", GradientBoostingClassifier(random_state=42))\n])\n# pipe.fit(X_train, y_train); pipe.predict(X_test)\nprint(\"Pipeline steps:\", [name for name, _ in pipe.steps])\n```\n\n## Common Workflows\n\n### Workflow 1: End-to-End Classification\n\n**Goal**: Complete classification workflow from data loading to evaluation.\n\n```python\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split, cross_val_score\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import classification_report\nfrom sklearn.datasets import load_breast_cancer\n\n# Load data\nX, y = load_breast_cancer(return_X_y=True, as_frame=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, stratify=y, random_state=42)\n\n# Build pipeline\npipe = Pipeline([\n    (\"scaler\", StandardScaler()),\n    (\"clf\", RandomForestClassifier(n_estimators=200, random_state=42))\n])\n\n# Cross-validate\ncv_scores = cross_val_score(pipe, X_train, y_train, cv=5, scoring=\"f1\")\nprint(f\"CV F1: {cv_scores.mean():.3f} ± {cv_scores.std():.3f}\")\n\n# Final evaluation\npipe.fit(X_train, y_train)\ny_pred = pipe.predict(X_test)\nprint(classification_report(y_test, y_pred))\n```\n\n### Workflow 2: Clustering with Visualization\n\n**Goal**: Cluster data and visualize with dimensionality reduction.\n\n```python\nfrom sklearn.datasets import make_blobs\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.cluster import KMeans\nfrom sklearn.decomposition import PCA\nfrom sklearn.metrics import silhouette_score\nimport matplotlib.pyplot as plt\n\n# Generate and scale data\nX, _ = make_blobs(n_samples=500, centers=4, random_state=42)\nX_scaled = StandardScaler().fit_transform(X)\n\n# Cluster\nkm = KMeans(n_clusters=4, random_state=42, n_init=10)\nlabels = km.fit_predict(X_scaled)\nprint(f\"Silhouette: {silhouette_score(X_scaled, labels):.3f}\")\n\n# Visualize\nX_2d = PCA(n_components=2).fit_transform(X_scaled)\nplt.scatter(X_2d[:, 0], X_2d[:, 1], c=labels, cmap=\"viridis\", s=20, alpha=0.7)\nplt.title(\"K-Means Clustering (PCA projection)\")\nplt.savefig(\"clustering_result.png\", dpi=150, bbox_inches=\"tight\")\nprint(\"Saved clustering_result.png\")\n```\n\n### Workflow 3: Feature Selection + Model Pipeline\n\n**Goal**: Select best features and build a tuned model.\n\n```python\nfrom sklearn.datasets import make_classification\nfrom sklearn.feature_selection import SelectKBest, f_classif\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.svm import SVC\nfrom sklearn.model_selection import GridSearchCV\n\nX, y = make_classification(n_samples=500, n_features=50, n_informative=10, random_state=42)\n\npipe = Pipeline([\n    (\"scaler\", StandardScaler()),\n    (\"selector\", SelectKBest(f_classif)),\n    (\"svm\", SVC(kernel=\"rbf\"))\n])\n\nparam_grid = {\n    \"selector__k\": [5, 10, 20],\n    \"svm__C\": [0.1, 1, 10],\n    \"svm__gamma\": [\"scale\", \"auto\"]\n}\n\ngrid = GridSearchCV(pipe, param_grid, cv=5, scoring=\"accuracy\", n_jobs=-1)\ngrid.fit(X, y)\nprint(f\"Best params: {grid.best_params_}\")\nprint(f\"Best accuracy: {grid.best_score_:.3f}\")\n```\n\n## Key Parameters\n\n| Parameter | Module | Default | Range \u002F Options | Effect |\n|-----------|--------|---------|-----------------|--------|\n| `n_estimators` | RandomForest, GradientBoosting | `100` | `50`-`1000` | Number of trees; higher = better but slower |\n| `max_depth` | Tree-based models | `None` | `1`-`50`, `None` | Tree depth; `None` = no limit (can overfit) |\n| `C` | SVM, LogisticRegression | `1.0` | `0.001`-`1000` | Regularization strength (inverse); lower = more regularization |\n| `alpha` | Ridge, Lasso | `1.0` | `0.001`-`100` | Regularization strength; higher = more regularization |\n| `n_clusters` | KMeans | required | `2`-`N` | Number of clusters to form |\n| `eps` | DBSCAN | `0.5` | `0.01`-`10` | Neighborhood radius; smaller = more clusters |\n| `n_components` | PCA | required | `1`-`N` or `0.0`-`1.0` | Components to keep; float = variance ratio |\n| `perplexity` | t-SNE | `30` | `5`-`50` | Balance local\u002Fglobal structure |\n| `cv` | GridSearchCV | `5` | `2`-`10` | Cross-validation folds |\n| `scoring` | GridSearchCV, cross_val_score | varies | `accuracy`, `f1`, `roc_auc`, etc. | Evaluation metric |\n\n## Common Recipes\n\n### Recipe: Feature Importance Analysis\n\nWhen to use: Understanding which features drive model predictions.\n\n```python\nimport numpy as np\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.datasets import load_iris\n\nX, y = load_iris(return_X_y=True)\nclf = RandomForestClassifier(n_estimators=200, random_state=42).fit(X, y)\n\nimportances = clf.feature_importances_\nindices = np.argsort(importances)[::-1]\nfeature_names = load_iris().feature_names\nfor i in range(X.shape[1]):\n    print(f\"{feature_names[indices[i]]}: {importances[indices[i]]:.4f}\")\n```\n\n### Recipe: Learning Curve Diagnosis\n\nWhen to use: Diagnosing overfitting vs underfitting.\n\n```python\nfrom sklearn.model_selection import learning_curve\nimport matplotlib.pyplot as plt\nimport numpy as np\n\ntrain_sizes, train_scores, val_scores = learning_curve(\n    clf, X, y, cv=5, train_sizes=np.linspace(0.1, 1.0, 10), scoring=\"accuracy\"\n)\nplt.plot(train_sizes, train_scores.mean(axis=1), label=\"Train\")\nplt.plot(train_sizes, val_scores.mean(axis=1), label=\"Validation\")\nplt.xlabel(\"Training size\"); plt.ylabel(\"Accuracy\"); plt.legend()\nplt.savefig(\"learning_curve.png\", dpi=150, bbox_inches=\"tight\")\nprint(\"Saved learning_curve.png\")\n```\n\n### Recipe: Save and Load Models\n\nWhen to use: Persisting trained models for later use.\n\n```python\nimport joblib\n\n# Save\njoblib.dump(pipe, \"model_pipeline.joblib\")\nprint(\"Model saved to model_pipeline.joblib\")\n\n# Load\nloaded_pipe = joblib.load(\"model_pipeline.joblib\")\ny_pred = loaded_pipe.predict(X_test)\nprint(f\"Loaded model predictions: {y_pred[:5]}\")\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `ConvergenceWarning` | Model didn't converge | Increase `max_iter` (e.g., 1000) or scale features with `StandardScaler` |\n| High train accuracy, low test accuracy | Overfitting | Add regularization, reduce `max_depth`, use cross-validation |\n| `ValueError: unknown categories` | New categories in test data | Use `OneHotEncoder(handle_unknown='ignore')` |\n| `MemoryError` with large data | Full dataset in memory | Use `SGDClassifier`\u002F`MiniBatchKMeans` for incremental learning |\n| Poor clustering results | Unscaled features or wrong k | Scale features first; use silhouette score to find optimal k |\n| `NotFittedError` | Predict before fit | Call `model.fit(X_train, y_train)` first |\n| Different results each run | Missing `random_state` | Set `random_state=42` in model and `train_test_split` |\n| Slow GridSearchCV | Large parameter grid | Use `RandomizedSearchCV` or `HalvingGridSearchCV`; add `n_jobs=-1` |\n\n## References\n\n- [scikit-learn User Guide](https:\u002F\u002Fscikit-learn.org\u002Fstable\u002Fuser_guide.html) — official documentation\n- [scikit-learn API Reference](https:\u002F\u002Fscikit-learn.org\u002Fstable\u002Fapi\u002Findex.html) — complete API\n- [scikit-learn Examples Gallery](https:\u002F\u002Fscikit-learn.org\u002Fstable\u002Fauto_examples\u002F) — tutorials\n- Pedregosa et al. (2011). Scikit-learn: Machine Learning in Python. *JMLR* 12:2825-2830.\n",{"name":5,"license":15,"description":7},"master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fawesome-skills\u002Fscikit-learn-machine-learning",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill scikit-learn-machine-learning",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill scikit-learn-machine-learning",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill scikit-learn-machine-learning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fscikit-learn-machine-learning\u002FSKILL.md",true,[],[49,58,65,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]