概念
Combining models
Bagging, boosting, stacking and voting raise accuracy. Pipelines and cascades cut cost.
本课尚未翻译,暂以英文显示。
Bagging
- How
- Parallel models, averaged
- Helps
- Variance
Boosting
- How
- Models in sequence
- Helps
- Bias
Stacking
- How
- A meta-model combines them
- Helps
- Accuracy
Voting
- How
- Majority or average
- Helps
- A simple gain
| Method | How | Helps |
|---|---|---|
| Bagging | Parallel models, averaged | Variance |
| Boosting | Models in sequence | Bias |
| Stacking | A meta-model combines them | Accuracy |
| Voting | Majority or average | A simple gain |
是什么
An ensemble combines several models so the group beats any one of them. Bagging trains many models in parallel on random samples of the data and averages them, which cuts variance. Random forest is the classic. Boosting trains models one after another, each correcting the errors of the last, which cuts bias. XGBoost and LightGBM are boosted trees. Stacking trains a meta-model that learns how to combine the predictions of different base models. Voting takes the majority class, or the average, of several models.
是什么
Combining also helps with cost and structure. A SageMaker AI inference pipeline chains two to fifteen containers on one endpoint, for example preprocessing, then the model, then postprocessing, so a request flows through all of them in one call. A model cascade runs a cheap model first and sends only low-confidence cases to a larger model or a foundation model, so most traffic stays cheap. Routing goes a step further: a router sends each request to the model that fits it, as Amazon Bedrock intelligent prompt routing does between two models of one family.
是什么
The cost of an ensemble is more models to train and serve, with more latency and compute. Use one when the accuracy gain is worth it.
要记住
- Bagging: parallel models on samples, lower variance.
- Boosting: models in sequence that fix errors, lower bias.
- Stacking: a meta-model combines the base models.
- Voting: the majority or the average.
- Inference pipeline: 2 to 15 containers in sequence behind one endpoint.
要记住
- Cascade: a cheap model first, and a large model or FM only when unsure.
考试中
- “Preprocessing and a model in one real-time call” points to an inference pipeline.
- “Most requests are easy and the FM is costly” points to a cascade or routing.
- “Reduce the variance of a decision tree” points to bagging, such as a random forest.
本任务内容 · 2.2
- Built-in algorithms for tabular data
- Built-in algorithms: clustering, dimensionality reduction, anomaly
- Built-in algorithms: text, sequence and forecasting
- Built-in algorithms: image and video
- Training jobs, script mode and ML libraries
SageMaker AMT
- Reducing training time
- Distributed training and HyperPod
- Overfitting, underfitting and catastrophic forgetting
- Combining models
- Epochs, steps, batch size and learning rate
- Task-specific prompt engineering
- Fine-tuning and continued pre-training in Bedrock
- PEFT, LoRA and fine-tuning on SageMaker
- Model distillation
- Optimizing retrieval and embedding models