跳到正文
cccskills
免费在 GitHub 公开

machine-learning

Machine learning development patterns, model training, evaluation, and deployment. Use when building ML pipelines, training models, feature engineering, model evaluation, or deploying ML systems to production.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(3)

  • SKILL.md6.1 KB
  • references/preprocessing.md3.4 KB
  • skill-report.json13.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Machine Learning

Comprehensive machine learning skill covering the full ML lifecycle from experimentation to production deployment.

When to Use This Skill

  • Building machine learning pipelines
  • Feature engineering and data preprocessing
  • Model training, evaluation, and selection
  • Hyperparameter tuning and optimization
  • Model deployment and serving
  • ML experiment tracking and versioning
  • Production ML monitoring and maintenance

ML Development Lifecycle

1. Problem Definition

Classification Types:

  • Binary classification (spam/not spam)
  • Multi-class classification (image categories)
  • Multi-label classification (document tags)
  • Regression (price prediction)
  • Clustering (customer segmentation)
  • Ranking (search results)
  • Anomaly detection (fraud detection)

Success Metrics by Problem Type:

Problem TypePrimary MetricsSecondary Metrics
Binary ClassificationAUC-ROC, F1Precision, Recall, PR-AUC
Multi-classMacro F1, AccuracyPer-class metrics
RegressionRMSE, MAER², MAPE
RankingNDCG, MAPMRR
ClusteringSilhouette, Calinski-HarabaszDavies-Bouldin

2. Data Preparation

Data Quality Checks:

  • Missing value analysis and imputation strategies
  • Outlier detection and handling
  • Data type validation
  • Distribution analysis
  • Target leakage detection

Feature Engineering Patterns:

  • Numerical: scaling, binning, log transforms, polynomial features
  • Categorical: one-hot, target encoding, frequency encoding, embeddings
  • Temporal: lag features, rolling statistics, cyclical encoding
  • Text: TF-IDF, word embeddings, transformer embeddings
  • Geospatial: distance features, clustering, grid encoding

Train/Test Split Strategies:

  • Random split (standard)
  • Stratified split (imbalanced classes)
  • Time-based split (temporal data)
  • Group split (prevent data leakage)
  • K-fold cross-validation

3. Model Selection

Algorithm Selection Guide:

Data SizeProblemRecommended Models
Small (<10K)ClassificationLogistic Regression, SVM, Random Forest
Small (<10K)RegressionLinear Regression, Ridge, SVR
Medium (10K-1M)ClassificationXGBoost, LightGBM, Neural Networks
Medium (10K-1M)RegressionXGBoost, LightGBM, Neural Networks
Large (>1M)AnyDeep Learning, Distributed training
TabularAnyGradient Boosting (XGBoost, LightGBM, CatBoost)
ImagesClassificationCNN, ResNet, EfficientNet, Vision Transformers
TextNLPTransformers (BERT, RoBERTa, GPT)
SequentialTime SeriesLSTM, Transformer, Prophet

4. Model Training

Hyperparameter Tuning:

  • Grid Search: exhaustive, good for small spaces
  • Random Search: efficient, good for large spaces
  • Bayesian Optimization: smart exploration (Optuna, Hyperopt)
  • Early stopping: prevent overfitting

Common Hyperparameters:

ModelKey Parameters
XGBoostlearning_rate, max_depth, n_estimators, subsample
LightGBMnum_leaves, learning_rate, n_estimators, feature_fraction
Random Forestn_estimators, max_depth, min_samples_split
Neural Networkslearning_rate, batch_size, layers, dropout

5. Model Evaluation

Evaluation Best Practices:

  • Always use held-out test set for final evaluation
  • Use cross-validation during development
  • Check for overfitting (train vs validation gap)
  • Evaluate on multiple metrics
  • Analyze errors qualitatively

Handling Imbalanced Data:

  • Resampling: SMOTE, undersampling
  • Class weights: weighted loss functions
  • Threshold tuning: optimize decision threshold
  • Evaluation: use PR-AUC over ROC-AUC

6. Production Deployment

Model Serving Patterns:

  • REST API (Flask, FastAPI, TF Serving)
  • Batch inference (scheduled jobs)
  • Streaming (real-time predictions)
  • Edge deployment (mobile, IoT)

Production Considerations:

  • Latency requirements (p50, p95, p99)
  • Throughput (requests per second)
  • Model size and memory footprint
  • Fallback strategies
  • A/B testing framework

7. Monitoring & Maintenance

What to Monitor:

  • Prediction latency
  • Input feature distributions (data drift)
  • Prediction distributions (concept drift)
  • Model performance metrics
  • Error rates and types

Retraining Triggers:

  • Performance degradation below threshold
  • Significant data drift detected
  • Scheduled retraining (daily, weekly)
  • New training data available

MLOps Best Practices

Experiment Tracking

Track for every experiment:

  • Code version (git commit)
  • Data version (hash or version ID)
  • Hyperparameters
  • Metrics (train, validation, test)
  • Model artifacts
  • Environment (packages, versions)

Model Versioning

models/
├── model_v1.0.0/
│   ├── model.pkl
│   ├── metadata.json
│   ├── requirements.txt
│   └── metrics.json
├── model_v1.1.0/
└── model_v2.0.0/

CI/CD for ML

  1. Continuous Integration:

    • Data validation tests
    • Model training tests
    • Performance regression tests
  2. Continuous Deployment:

    • Staging environment validation
    • Shadow mode testing
    • Gradual rollout (canary)
    • Automatic rollback

Reference Files

For detailed patterns and code examples, load reference files as needed:

  • references/preprocessing.md - Data preprocessing patterns and feature engineering techniques
  • references/model_patterns.md - Model architecture patterns and implementation examples
  • references/evaluation.md - Comprehensive evaluation strategies and metrics

Integration with Other Skills

  • performance - For optimizing inference latency
  • testing - For ML-specific testing patterns
  • database-optimization - For feature store queries
  • debugging - For model debugging and error analysis

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Trigger for: explaining current FAR, DFARS, or agency-supplement text; determining documented acquisition-policy status for an agency and FAR part; comparing codified text, RFO model text, and agency deviations; tracing acquisition rulemaking; finding procurement comment periods; analyzing public comments; refreshing prior policy analysis; or producing an Acquisition Policy Impact Brief. Use published federal sources and supplied policy documents without making legal or procurement-specific applicability determinations. Do not use for clause selection, market research execution, opportunities, pricing, grants, or cooperative agreements.

中文简介正在准备中。当前显示原文说明。

aiskillstore/marketplace4392026年10月18日 更新

Systematic framework for extracting actionable items from documents and organizing them into prioritized, trackable checklists. Use when converting reports, meeting notes, audits, or any document with embedded action items into structured TODO lists.

中文简介正在准备中。当前显示原文说明。

aiskillstore/marketplace4392026年10月18日 更新

Browser automation for AI agents via inference.sh. Navigate web pages, interact with elements using @e refs, take screenshots, record video. Capabilities: web scraping, form filling, clicking, typing, drag-drop, file upload, JavaScript execution. Use for: web automation, data extraction, testing, agent browsing, research. Triggers: browser, web automation, scrape, navigate, click, fill form, screenshot, browse web, playwright, headless browser, web agent, surf internet, record video

中文简介正在准备中。当前显示原文说明。

aiskillstore/marketplace4392026年10月18日 更新

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

中文简介正在准备中。当前显示原文说明。

aiskillstore/marketplace4392026年10月18日 更新

Run AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

中文简介正在准备中。当前显示原文说明。

aiskillstore/marketplace4392026年10月18日 更新

Agile ceremonies and sprint management specialist. Use when running standups, retrospectives, sprint planning, or tracking sprint progress.

中文简介正在准备中。当前显示原文说明。

aiskillstore/marketplace4392026年10月18日 更新

查看 aiskillstore 的全部技能

报告此技能的问题