What is deploy model function in regression model in pycaret

This recipe explains the deploy model function in the regression model. This module deploys the transformation pipeline and trained model on the cloud.

Recipe Objective - What is the deploy_model function in the regression model in pycaret?

PyCaret provides the deploy_model function in the regression module.

This module is provided by the PyCaret python library. PyCaret is an open-source, less-code machine learning python library. PyCaret automates machine learning workflow.  PyCaret library is wrapped around some machine learning libraries such as sklearn, XGBoost, LightGBM, CatBoost, spaCy, Optuna, Hyperopt, Ray, and many more.

deploy_model function with Example:-

PyCaret provides "pycaret.regression.deploy_model()" function. Deploy model function deploys the transformation pipeline and trained model on cloud.

from pycaret.datasets import get_data
bost = get_data('boston')
# importing regression module
from pycaret.regression import *
# initialize setup
set_up = setup(data = bost, target = 'medv')
# logistic regression
log_reg = create_model('lr')
# sets appropriate credentials for the platform as environment variables
import os
# set your cloud ACCESS_KEY_ID, SECRET_ACCESS_KEY
os.environ["AWS_ACCESS_KEY_ID"] = str("foo")
os.environ["AWS_SECRET_ACCESS_KEY"] = str("bar")
deploy_model(model = lr, model_name = 'lr-for-deployment', platform = 'aws',
    authentication = {'bucket' : 'S3-bucket-name'})

What Users are saying..

profile image

Gautam Vermani

Data Consultant at Confidential
linkedin profile url

Having worked in the field of Data Science, I wanted to explore how I can implement projects in other domains, So I thought of connecting with ProjectPro. A project that helped me absorb this topic... Read More

Relevant Projects

Azure Deep Learning-Deploy RNN CNN models for TimeSeries
In this Azure MLOps Project, you will learn to perform docker-based deployment of RNN and CNN Models for Time Series Forecasting on Azure Cloud.

Time Series Forecasting Project-Building ARIMA Model in Python
Build a time series ARIMA model in Python to forecast the use of arrival rate density to support staffing decisions at call centres.

Build a CNN Model with PyTorch for Image Classification
In this deep learning project, you will learn how to build an Image Classification Model using PyTorch CNN

Deploying Machine Learning Models with Flask for Beginners
In this MLOps on GCP project you will learn to deploy a sales forecasting ML Model using Flask.

Hands-On Approach to Causal Inference in Machine Learning
In this Machine Learning Project, you will learn to implement various causal inference techniques in Python to determine, how effective the sprinkler is in making the grass wet.

Recommender System Machine Learning Project for Beginners-4
Collaborative Filtering Recommender System Project - Comparison of different model based and memory based methods to build recommendation system using collaborative filtering.

Locality Sensitive Hashing Python Code for Look-Alike Modelling
In this deep learning project, you will find similar images (lookalikes) using deep learning and locality sensitive hashing to find customers who are most likely to click on an ad.

OpenCV Project for Beginners to Learn Computer Vision Basics
In this OpenCV project, you will learn computer vision basics and the fundamentals of OpenCV library using Python.

Build ARCH and GARCH Models in Time Series using Python
In this Project we will build an ARCH and a GARCH model using Python

A/B Testing Approach for Comparing Performance of ML Models
The objective of this project is to compare the performance of BERT and DistilBERT models for building an efficient Question and Answering system. Using A/B testing approach, we explore the effectiveness and efficiency of both models and determine which one is better suited for Q&A tasks.