Let's start another course which is also related to machine learning.
This time we will focus more on Machine Learning Infrastructure.
Don't worry if it sounds not so friendly to you.
Introduction
If you've built machine learning models with scikit-learn, and you want to serve your models in real time for an application, managing the resulting infrastructure may sound like a nightmare. Fortunately, there's an alternative - serving your trained scikit-learn models on AI Platform.
You can now upload a model you've already trained onto Cloud Storage and use AI Platform Prediction to support scalable prediction requests against your trained model.
What we will build
Let's learn about the different tools you'll be using to get online prediction up and running on AI Platform:
Google Cloud lets you build and host applications and websites, store data, and analyze data on Google's scalable infrastructure.
AI Platform Prediction is a managed service that enables you to easily build machine learning models that work on any type of data, of any size.
Cloud Storage is a unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archiving.
Cloud SDK is a command line tool which allows you to interact with Google Cloud products.
Train and save your model
Load the data into a pandas DataFrame to prepare it for use with XGBoost. Train a simple model in XGBoost. Save the model to a file that can be uploaded to AI Platform.
Upload the saved model
To use your model with AI Platform, you'll need to upload it to Cloud Storage.
Create a model resource
AI Platform organizes your trained models using model and version resources. An AI Platform model is a container for the versions of your machine learning model. More information on model resources and model versions can be found in the scikit-learn documentation.
Create a model version
Now it's time to get a version of your model uploaded to your container. This will allow you to make online predictions. The model version requires a few components, specified here.
Make an online prediction
It's time to make an online prediction in Python with your newly deployed model.
This time we gave a brief introduction for each step.
Hope you enjoy today's sharing~