What is plot model function in regression model in pycaret

This recipe explains what is plot model function in the regression model in pycaret. This model function helps to analyzes the performance of a trained model.

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

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. 

PyCaret provides the plot_model function in the regression module.

 

For more related projects:-

https://www.projectpro.io/projects/data-science-projects/tensorflow-projects
https://www.projectpro.io/projects/data-science-projects/keras-deep-learning-projects

plot_model function with Example:-

PyCaret provides "pycaret.regression.plot_models()" function. Plot model function analyzes the performance of a trained model on holdout set.

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')
# decision tree
log_reg = create_model('dt')
# area under the curve
plot_model(log_reg, plot = 'tree')

List of plots in PyCaret:-

‘auc’ - Area Under the Curve

‘threshold’ - Discrimination Threshold

‘pr’ - Precision-Recall Curve

‘confusion_matrix’ - Confusion Matrix

‘error’ - Class Prediction Error

‘class_report’ - Classification Report

‘boundary’ - Decision Boundary

‘rfe’ - Recursive Feature Selection

‘learning’ - Learning Curve

‘manifold’ - Manifold Learning

‘calibration’ - Calibration Curve

‘vc’ - Validation Curve

‘dimension’ - Dimension Learning

‘feature’ - Feature Importance

‘feature_all’ - Feature Importance

‘parameter’ - Model Hyperparameter

‘lift’ - Lift Curve

‘gain’ - Gain Chart

‘tree’ - Decision Tree

‘ks’ - KS Statistic Plot

What Users are saying..

profile image

Ray han

Tech Leader | Stanford / Yale University
linkedin profile url

I think that they are fantastic. I attended Yale and Stanford and have worked at Honeywell,Oracle, and Arthur Andersen(Accenture) in the US. I have taken Big Data and Hadoop,NoSQL, Spark, Hadoop... Read More

Relevant Projects

Classification Projects on Machine Learning for Beginners - 1
Classification ML Project for Beginners - A Hands-On Approach to Implementing Different Types of Classification Algorithms in Machine Learning for Predictive Modelling

NLP Project on LDA Topic Modelling Python using RACE Dataset
Use the RACE dataset to extract a dominant topic from each document and perform LDA topic modeling in python.

Learn to Build a Siamese Neural Network for Image Similarity
In this Deep Learning Project, you will learn how to build a siamese neural network with Keras and Tensorflow for Image Similarity.

MLOps Project to Build Search Relevancy Algorithm with SBERT
In this MLOps SBERT project you will learn to build and deploy an accurate and scalable search algorithm on AWS using SBERT and ANNOY to enhance search relevancy in news articles.

Recommender System Machine Learning Project for Beginners-2
Recommender System Machine Learning Project for Beginners Part 2- Learn how to build a recommender system for market basket analysis using association rule mining.

Build CNN for Image Colorization using Deep Transfer Learning
Image Processing Project -Train a model for colorization to make grayscale images colorful using convolutional autoencoders.

Learn How to Build PyTorch Neural Networks from Scratch
In this deep learning project, you will learn how to build PyTorch neural networks from scratch.

Build a Text Classification Model with Attention Mechanism NLP
In this NLP Project, you will learn to build a multi class text classification model with attention mechanism.

Recommender System Machine Learning Project for Beginners-3
Content Based Recommender System Project - Building a Content-Based Product Recommender App with Streamlit

Deploy Transformer-BART Model on Paperspace Cloud
In this MLOps Project you will learn how to deploy a Tranaformer BART Model for Abstractive Text Summarization on Paperspace Private Cloud