How to Quickly Save a Trained Machine Learning Model

This blog post discusses how to quickly save a trained machine learning model that suggests recipes based on the user’s data, and nutritional value using Joblib and Pickle. The reason I decided to work on this is that the domain of food is varied and complex and presents many challenges to developing a recommender system. In addition to the nutritional value, price, preparation time, and cultural aspects of a meal, ingredients and cooking methods play a significant role. Diet and nutrition are complex domains for recommenders that are required to assist users with starting and maintaining healthy lifestyles. This post is a continuation from here.

The first recommender uses publicly available data from Kaggle and mock data for the user.

The steps involved in the project are as follows:

  1. Quickly Save trained machine learning model using Joblib and Pickle. The model is able to predict calorie levels from the user’s demographic, preferences, and nutritional value. 

2. Use the predicted calorie level to randomly suggest a recipe from the database.

3. Build and deploy a web application

ADataAnalyst is reader-supported. As an Amazon Associate, I earn from qualifying purchases when you buy through links on our site

Save Trained Machine Learning Model


In the following post, I am going to create a frontend to the pickle file of the model and deploy it using:

  1. GitHub Repository
  2. Streamlit Sharing
  3. AWS EC2 instance
  4. AWS Beanstalk
  5. AWS Fargate

I am also going to assess the advantages and disadvantages of each deployment technique.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.