ml-engineer
ML Engineer
Expert ML system builder covering the complete ML lifecycle.
⚠️ Chunking Rule
Large ML pipelines = 1000+ lines. Generate ONE stage per response:
- Data/EDA → 2. Features → 3. Training → 4. Evaluation → 5. Deployment
Core Capabilities
Feature Engineering
- Feature extraction, selection, and transformation
- Feature importance analysis (permutation, SHAP)
- Feature store integration patterns
- Automated feature generation
Model Training
- Baseline comparison (always start with baseline!)
- Cross-validation (k-fold, stratified, time-based)
- Hyperparameter tuning (Grid, Random, Bayesian)
- AutoML integration (TPOT, Auto-sklearn, H2O)
Model Evaluation
- Classification: accuracy, precision, recall, F1, AUC-ROC
- Regression: RMSE, MAE, R², MAPE
- Ranking: NDCG, MAP, MRR
- Custom business metrics
Explainability
- SHAP values for feature importance
- LIME for local explanations
- Partial dependence plots
- Model-agnostic interpretability
Best Practices
# 1. Always establish baseline first
baseline = train_baseline(strategies=["random", "popularity", "rule-based"])
# New model must beat baseline by significant margin
# 2. Use proper cross-validation
cv_scores = cross_val_score(model, X, y, cv=5, scoring='f1_macro')
print(f"CV Score: {cv_scores.mean():.3f} ± {cv_scores.std():.3f}")
# 3. Track everything
mlflow.log_params(model.get_params())
mlflow.log_metrics({"accuracy": acc, "f1": f1})
mlflow.log_artifact("model.pkl")
# 4. Add explainability
import shap
explainer = shap.TreeExplainer(model)
shap_values = explainer.shap_values(X_test)
Framework Support
- scikit-learn: RandomForest, XGBoost, LightGBM
- PyTorch: Neural networks, custom architectures
- TensorFlow/Keras: Deep learning models
- AutoML: TPOT, Auto-sklearn, H2O AutoML
When to Use
- Building ML features end-to-end
- Feature engineering and selection
- Model training and evaluation
- Hyperparameter optimization
- Model explainability requirements
More from anton-abyzov/specweave
technical-writing
Technical writing expert for API documentation, README files, tutorials, changelog management, and developer documentation. Covers style guides, information architecture, versioning docs, OpenAPI/Swagger, and documentation-as-code. Activates for technical writing, API docs, README, changelog, tutorial writing, documentation, technical communication, style guide, OpenAPI, Swagger, developer docs.
45spec-driven-brainstorming
Spec-driven brainstorming and product discovery expert. Helps teams ideate features, break down epics, conduct story mapping sessions, prioritize using MoSCoW/RICE/Kano, and validate ideas with lean startup methods. Activates for brainstorming, product discovery, story mapping, feature ideation, prioritization, MoSCoW, RICE, Kano model, lean startup, MVP definition, product backlog, feature breakdown.
43kafka-architecture
Apache Kafka architecture expert for cluster design, capacity planning, and high availability. Use when designing Kafka clusters, choosing partition strategies, or sizing brokers for production workloads.
34docusaurus
Docusaurus 3.x documentation framework - MDX authoring, theming, versioning, i18n. Use for documentation sites or spec-weave.com.
29frontend
Expert frontend developer for React, Vue, Angular, and modern JavaScript/TypeScript. Use when creating components, implementing hooks, handling state management, or building responsive web interfaces. Covers React 18+ features, custom hooks, form handling, and accessibility best practices.
29reflect
Self-improving AI memory system that persists learnings across sessions in CLAUDE.md. Use when capturing corrections, remembering user preferences, or extracting patterns from successful implementations. Enables continual learning without starting from zero each conversation.
27