How to use Pickling to Save a Trained Machine Learning Model to use for Deployment Later

Published: 21 April 2021
on channel: Gina Sprint
1,236
16

This video provides an overview of how to use pickle (a standard Python library) to save a trained machine learning model (or really, any Python object) as a binary file. This process is called pickling, or more generally, object serialization. The binary file can be unpickled, or more genearlly de-serialized, into a Python object again later, perhaps via a different Python process. The latter would be the case for deploying the machine learning model to a server to be used to make predictions for unseen instances coming in via client API requests. A simple list representation of a decision tree model is pickled, unpickled, and traversed via a recursive algorithm to make predictions for such requests.

The decision tree used is based on a toy "interview" dataset that I don't have a reference for (sorry! let me know in the comments if you know its original source). The tree was trained using an entropy-based TDIDT (top-down induction of decision trees) algorithm that is not covered in this video.

This video is part 4 of an 8 part series on APIs and machine learning model deployment with Python. The next video in this series is:    • How to Deploy a Flask App to the Web ...  
The previous video in this series is:    • How to Create a Simple Flask Web App ...  


Watch video How to use Pickling to Save a Trained Machine Learning Model to use for Deployment Later online without registration, duration hours minute second in high quality. This video was added by user Gina Sprint 21 April 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,236 once and liked it 16 people.