Modeling
Modeling
This domain covers selecting, training, and tuning models in SageMaker. Know the built-in algorithms: XGBoost (tabular), Linear Learner, BlazingText (text), Image Classification, Object Detection, DeepAR (time series), and K-Means. Understand SageMaker Automatic Model Tuning (hyperparameter optimization) with Bayesian strategy. Know how to evaluate models: train/validation/test split, cross-validation, and metrics (accuracy, precision, recall, F1, RMSE, AUC). Also understand SageMaker Experiments for tracking. For custom models, use frameworks (TensorFlow, PyTorch, scikit-learn) with SageMaker's pre-built containers or bring your own.
Traps: Built-in algorithms have specific input formats (e.g., XGBoost expects CSV or libsvm). Automatic Model Tuning requires a metric to optimize; it runs multiple training jobs. Do not confuse hyperparameter tuning with feature engineering. Also, for imbalanced data, accuracy is misleading; use F1 or AUC. Another trap: SageMaker's Linear Learner can handle classification and regression; it requires normalization. For time series, DeepAR is for probabilistic forecasting; it needs a target and optional related features.
Worked example: You have a tabular binary classification problem with 10,000 rows. Use XGBoost with SageMaker's built-in container. Split data 80/10/10. Set hyperparameter ranges for max_depth and eta, and use Automatic Model Tuning with objective metric 'validation:auc'. Deploy the best model. Rule of thumb: Start with XGBoost for tabular; use automatic tuning to save time; always monitor for overfitting via validation curves.