[MLS-C01] [Modeling] Train machine learning models

Posted by Oscaner on June 25, 2022

Training the model is part of the iterative model improvement cycle

Training & Inference Instances

Training and inference instances for SageMaker built-in algorithms

The Steps of Training ML Model

1. Gather/Engineer

  • Gather/engineer data into your dataset

2. Randomize & Split

  • Randomize the dataset
  • Split the dataset into train and test datasets

3. Choose Algorithm

  • Choose best algorithm

4. Load Container & Define Hyperparameters

  • Load container for chosen model
  • Manage compute capacity
  • Create an instance of chosen model
  • Define the model’s hyperparameter values

5. Train the Model

  • Train the model

6. Deploy the Model

Deploy in one of two ways

  • Persistent endpoint to get one prediction at a time: SageMaker Hosting Services
  • Get predictions for an entire dataset: SageMaker Batch Transform

SageMaker Hosting Services

SageMaker provides an HTTPS endpoint, making your model available for inference requests

Three steps:

  1. Create model in SageMaker
  2. Create an endpoint configuration
  3. Create HTTPS endpoint

SageMaker Batch Transform

SageMaker batch transform provides inferences for an entire dataset

Three steps:

  1. Create batch transform job using trained model and dataset
  2. Run the batch transform job
  3. SageMaker saves in a results S3 bucket

Labs


本文由 Oscaner 创作, 采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外, 均为本站原创或翻译, 转载前请务必署名