Best practices for scikit-learn machine learning, model development, evaluation, and deployment in Python
Expert guidelines for scikit-learn development, focusing on machine learning workflows, model development, evaluation, and best practices.
train_test_split() with random_state for reproducibilitystratify=yStandardScaler for normally distributed featuresMinMaxScaler for bounded featuresRobustScaler for data with outliersOneHotEncoder, OrdinalEncoder, LabelEncoderSimpleImputer, KNNImputerPipeline to chain preprocessing and modelingfrom sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestClassifier
pipeline = Pipeline([
('scaler', StandardScaler()),
('classifier', RandomForestClassifier(random_state=42))
])
ColumnTransformer for different preprocessing per feature typecross_val_score() for quick evaluationcross_validate() for multiple metricsKFold for regressionStratifiedKFold for classificationTimeSeriesSplit for temporal dataGroupKFold for grouped dataGridSearchCV for exhaustive searchRandomizedSearchCV for large parameter spacesn_jobs=-1 for parallel processingaccuracy_score for balanced classesprecision_score, recall_score, f1_score for imbalancedroc_auc_score for ranking abilityclassification_report() for comprehensive overviewconfusion_matrix() for error analysismean_squared_error (MSE) for general usemean_absolute_error (MAE) for interpretabilityr2_score for explained varianceclass_weight='balanced'SelectKBest with statistical testsRFE (Recursive Feature Elimination)SelectFromModeljoblib for saving and loading modelsn_jobs=-1 for parallel processing where availablewarm_start=True for iterative trainingpartial_fit() for large datafrom sklearn.ensemble import RandomForestClassifierrandom_state for reproducibilitynpx skills add Mindrally/scikit-learn-best-practices下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer