set config and save config function in regression model in pycaret

This recipe explains the set config save config function in the regression model in pycaret. The set config function resets the global variables and the save config function saves all global variables to a pickle file.

Recipe Objective - What is the set_config, save_config function in the regression model in pycaret?

PyCaret provides the set_config and save_config function in the regression module.

Access YOLO OCR Character Recognition Project with Source Code

For more related projects:-

https://www.dezyre.com/projects/data-science-projects/tensorflow-projects
https://www.dezyre.com/projects/data-science-projects/keras-deep-learning-projects

set_config function with Example:-

PyCaret provides "pycaret.regression.set_config()" function. The set_config function resets the global variables.

Some Accessible variables:-

X: Transformed dataset (X)

y: Transformed dataset (y)

X_train: Transformed train dataset (X)

X_test: Transformed test/holdout dataset (X)

y_train: Transformed train dataset (y)

y_test: Transformed test/holdout dataset (y)

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')
set_config('seed', 123)

save_config function with Example:-

PyCaret provides "pycaret.regression.save_config()" function.

The save_config function saves all global variables to a pickle file, allowing to resume without rerunning the setup later.

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')
# saving our model
save_config('my_pycaret_model2.pkl')

What Users are saying..

profile image

Savvy Sahai

Data Science Intern, Capgemini
linkedin profile url

As a student looking to break into the field of data engineering and data science, one can get really confused as to which path to take. Very few ways to do it are Google, YouTube, etc. I was one of... Read More

Relevant Projects

Build Multi Class Text Classification Models with RNN and LSTM
In this Deep Learning Project, you will use the customer complaints data about consumer financial products to build multi-class text classification models using RNN and LSTM.

Census Income Data Set Project-Predict Adult Census Income
Use the Adult Income dataset to predict whether income exceeds 50K yr based oncensus data.

Ola Bike Rides Request Demand Forecast
Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.

OpenCV Project to Master Advanced Computer Vision Concepts
In this OpenCV project, you will learn to implement advanced computer vision concepts and algorithms in OpenCV library using Python.

MLOps Project to Deploy Resume Parser Model on Paperspace
In this MLOps project, you will learn how to deploy a Resume Parser Streamlit Application on Paperspace Private Cloud.

MLOps Project for a Mask R-CNN on GCP using uWSGI Flask
MLOps on GCP - Solved end-to-end MLOps Project to deploy a Mask RCNN Model for Image Segmentation as a Web Application using uWSGI Flask, Docker, and TensorFlow.

ML Model Deployment on AWS for Customer Churn Prediction
MLOps Project-Deploy Machine Learning Model to Production Python on AWS for Customer Churn Prediction

Hands-On Approach to Master PyTorch Tensors with Examples
In this deep learning project, you will learn how to perform various operations on the building block of PyTorch : Tensors.

Build a Text Generator Model using Amazon SageMaker
In this Deep Learning Project, you will train a Text Generator Model on Amazon Reviews Dataset using LSTM Algorithm in PyTorch and deploy it on Amazon SageMaker.

Abstractive Text Summarization using Transformers-BART Model
Deep Learning Project to implement an Abstractive Text Summarizer using Google's Transformers-BART Model to generate news article headlines.