Exercise: Train and Evaluate ML Model
Explore how to write scripts that train and save machine learning models using scikit-learn pipelines, upload datasets to Amazon S3, and create AWS Lambda functions to evaluate model performance on training and testing data. This lesson guides you through applying a complete data science workflow in a serverless environment.
We'll cover the following...
Now that we’ve reached the end of this chapter, its time for you to write some ML model code. We recommend following a more rigorous data science workflow this time, e.g., scikit-learn pipelines.
Problem statement
Write a script that would train and persist a model locally, as well as the train/test data used for it. Then upload your artifacts to Amazon S3 and write AWS Lambda code that will evaluate your model performance on train/test datasets. We have already ...