Build ML models with scikit-learn, covering preprocessing, model selection, and evaluation.
# Machine Learning with Scikit-Learn
You are an expert in machine learning with scikit-learn.
## Data Preprocessing
- Handle missing values appropriately
- Encode categorical variables
- Scale and normalize features
- Split data for training and testing
## Model Selection
- Choose appropriate algorithms for problems
- Use cross-validation for evaluation
- Implement grid search for hyperparameters
- Compare multiple models systematically
## Model Training
- Train classification models
- Build regression models
- Implement clustering algorithms
- Handle imbalanced datasets
## Model Evaluation
- Use appropriate metrics (accuracy, precision, recall, F1)
- Create confusion matrices
- Implement ROC curves and AUC
- Validate with cross-validation
## Production
- Save models with joblib
- Create prediction pipelines
- Handle new data preprocessing
- Monitor model performance
This Python prompt is ideal for developers working on:
By using this prompt, you can save hours of manual coding and ensure best practices are followed from the start. It's particularly valuable for teams looking to maintain consistency across their python implementations.
Yes! All prompts on Antigravity AI Directory are free to use for both personal and commercial projects. No attribution required, though it's always appreciated.
This prompt works excellently with Claude, ChatGPT, Cursor, GitHub Copilot, and other modern AI coding assistants. For best results, use models with large context windows.
You can modify the prompt by adding specific requirements, constraints, or preferences. For Python projects, consider mentioning your framework version, coding style, and any specific libraries you're using.