Docs
  • PyCaret 3.0
  • GET STARTED
    • 💻Installation
    • 🚀Quickstart
    • ⭐Tutorials
    • 📶Modules
    • ⚙️Data Preprocessing
      • Data Preparation
      • Scale and Transform
      • Feature Engineering
      • Feature Selection
      • Other setup parameters
    • 💡Functions
      • Initialize
      • Train
      • Optimize
      • Analyze
      • Deploy
      • Others
  • LEARN PYCARET
    • 📖Blog
      • Announcing PyCaret 1.0
      • Announcing PyCaret 2.0
      • 5 things you dont know about PyCaret
      • Build and deploy your first machine learning web app
      • Build your own AutoML in Power BI using PyCaret
      • Deploy ML Pipeline on Google Kubernetes
      • Deploy PyCaret and Streamlit on AWS Fargate
      • Anomaly Detector in Power BI using PyCaret
      • Deploy ML App on Google Kubernetes
      • Deploy Machine Learning Pipeline on GKE
      • Deploy Machine Learning Pipeline on AWS Fargate
      • Deploy ML Pipeline on the cloud with Docker
      • Clustering Analysis in Power BI using PyCaret
      • Deploy PyCaret Models on edge with ONNX Runtime
      • GitHub is the best AutoML you will ever need
      • Deploy PyCaret and Streamlit on AWS Fargate
      • Easy MLOps with PyCaret and MLflow
      • Clustering Analysis in Power BI using PyCaret
      • Machine Learning in Alteryx with PyCaret
      • Machine Learning in KNIME with PyCaret
      • Machine Learning in SQL using PyCaret Part I
      • Machine Learning in Power BI using PyCaret
      • Machine Learning in Tableau with PyCaret
      • Multiple Time Series Forecasting with PyCaret
      • Predict Customer Churn using PyCaret
      • Predict Lead Score (the Right Way) Using PyCaret
      • NLP Text Classification in Python using PyCaret
      • Predict Lead Score (the Right Way) Using PyCaret
      • Predicting Crashes in Gold Prices Using PyCaret
      • Predicting Gold Prices Using Machine Learning
      • PyCaret 2.1 Feature Summary
      • Ship ML Models to SQL Server using PyCaret
      • Supercharge Your ML with PyCaret and Gradio
      • Time Series 101 - For beginners
      • Time Series Anomaly Detection with PyCaret
      • Time Series Forecasting with PyCaret Regression
      • Topic Modeling in Power BI using PyCaret
      • Write and train custom ML models using PyCaret
      • Build and deploy ML app with PyCaret and Streamlit
      • PyCaret 2.3.6 is Here! Learn What’s New?
    • 📺Videos
    • 🛩️Cheat sheet
    • ❓FAQs
    • 👩‍💻Examples
  • IMPORTANT LINKS
    • 🛠️Release Notes
    • ⚙️API Reference
    • 🙋 Discussions
    • 📤Issues
    • 👮 License
  • MEDIA
    • 💻Slack
    • 📺YouTube
    • 🔗LinkedIn
    • 😾GitHub
    • 🔅Stack Overflow
Powered by GitBook
On this page
  • 🚀 Introduction
  • 💻 Installation
  • 📈 Dashboard
  • 📊 Exploratory Data Analysis (EDA)
  • 🚊 Convert Model
  • ☑️ Check Fairness
  • 📩 Create Web API
  • 🚢 Create Docker
  • 💻 Create Web Application
  • 🎰 Monitor Drift of ML Models
  • 🔨 Plot Model is now more configurable
  • 🏆Optimize Threshold
  • 📚 New Documentation
  • Important Links

Was this helpful?

  1. LEARN PYCARET
  2. Blog

PyCaret 2.3.6 is Here! Learn What’s New?

PyCaret 2.3.6 is Here! Learn What’s New? From EDA to Deployment to AI Fairness — By far the biggest release of PyCaret

PreviousBuild and deploy ML app with PyCaret and StreamlitNextVideos

Last updated 2 years ago

Was this helpful?

🚀 Introduction

PyCaret is an open-source, low-code machine learning library in Python that automates machine learning workflows. It is an end-to-end machine learning and model management tool that speeds up the experiment cycle exponentially and makes you more productive.

By far PyCaret 2.3.6 is the biggest release in terms of the new features and functionalities. This article demonstrates the use of new functionalities added in the recent release of .

💻 Installation

Installation is easy and will only take a few minutes. PyCaret’s default installation from pip only installs hard dependencies as listed in the file.

pip install pycaret

To install the full version:

pip install pycaret[full]

📈 Dashboard

This function will generate the interactive dashboard for a trained model. The dashboard is implemented using the .

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setupfrom pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# train model
lr = create_model('lr')

# generate dashboard
dashboard(lr)

Video Demo:

📊 Exploratory Data Analysis (EDA)

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setup
from pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# generate EDA
eda()

Video Demo:

🚊 Convert Model

This function will transpile trained machine learning models into native inference scripts in different programming languages (Python, C, Java, Go, JavaScript, Visual Basic, C#, PowerShell, R, PHP, Dart, Haskell, Ruby, F#). This functionality is very useful if you want to deploy models into environments where you can’t install your normal Python stack to support model inference.

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setup
from pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# train model
lr = create_model('lr')

# convert model
lr_java = convert_model(lr, language = 'java')
print(lr_java)

Video Demo:

☑️ Check Fairness

# load dataset
from pycaret.datasets import get_data
data = get_data('income')

# init setup
from pycaret.classification import *
s = setup(data, target = 'income >50K', session_id = 123)

# train model
lr = create_model('lr')

# check fairness
check_fairness(lr, sensitive_features = ['race'])

Video Demo:

📩 Create Web API

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setup
from pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# train model
lr = create_model('lr')

# create API
create_api(lr, 'my_first_api')

# Run the API
!python my_first_api.py

Video Demo:

🚢 Create Docker

This function will create a Dockerfileand requirementsfile for your API end-point.

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setup
from pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# train model
lr = create_model('lr')

# create API
create_api(lr, 'my_first_api')

# create Docker
create_docker('my_first_api')

Video Demo:

💻 Create Web Application

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setup
from pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# train model
lr = create_model('lr')

Video Demo:

🎰 Monitor Drift of ML Models

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setup
from pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# train model
lr = create_model('lr')

# generate report
preds = predict_model(lr, drift_report = True)

Video Demo:

🔨 Plot Model is now more configurable

plot_model function is PyCaret is now more configurable. For example, previously if you wanted to see percentages in Confusion Matrix instead of absolute numbers, it wasn’t possible, or if you want to change the color map of visuals, it wasn’t possible. Now it is possible with the new parameter plot_kwargs in the plot_model function. See example:

# load dataset
from pycaret.datasets import get_data
data = get_data('iris')

# init setup
from pycaret.classification import *
s = setup(data, target = 'species', session_id = 123)

# train model
lr = create_model('lr')

# plot model (without plot kwargs)
plot_model(lr, plot = 'confusion_matrix') 

# plot model (with plot kwargs)
plot_model(lr, plot = 'confusion_matrix', plot_kwargs = {'percent' : True})

🏆Optimize Threshold

This is not a new function but it was completely revamped in 2.3.6. This function is to optimize the probability threshold for binary classification problems. Previously you had to pass cost function as true_positive , false_positive , true_negative , false_negative in this function and now it automatically picks up all the metrics including the custom ones from your active experiment run.

# load dataset
from pycaret.datasets import get_data
data = get_data('blood')

# init setup
from pycaret.classification import *
s = setup(data, target = 'Class', session_id = 123)

# train model
lr = create_model('lr')

# optimize threshold
optimize_threshold(lr)

📚 New Documentation

The biggest and hardest of all is the completely new documentation. This is a single source of truth for everything related to PyCaret, from official tutorials to release notes and from API ref to community contributions. Take a video tour:

Finally, if you want to take the tour of all new functionalities added in 2.3.6, watch this 10 minutes video:

Thank you for reading.

This function will generate automated EDA using the integration.

There are many approaches to conceptualizing fairness. This new function follows the approach known as , which asks: Which groups of individuals are at risk for experiencing harm. This function provides fairness-related metrics between different groups (also called subpopulations).

This function will create a POST API for the ML pipeline for inference using framework. It only creates the API and doesn’t run it automatically.

This function creates a basic web app for inference. It will later be expanded for other app types such as Streamlit.

A new parameter called drift_report is added to the predict_model function that generates the drift report using framework. At the moment this functionality is in experimental mode and will only work on test data. Later on, it will be expanded for production use.

To learn about all the other changes, bug fixes, and minor updates in PyCaret 2.3.6, check out the detailed .

Important Links

📚 The bible of PyCaret. Everything is here.

🌐 Check out our official website

😺 Check out our Git

⭐ New to PyCaret? Check out our official notebooks!

📋 created by the community.

📙 Tutorials and articles by contributors.

❓ Check out frequently asked questions.

📺 Our video tutorial from various events.

📢 Have questions? Engage with community and contributors.

🛠️ Changes and version history.

🙌 Join our Meetup user group.

📖
🔗
PyCaret 2.3.6
requirements.txt
ExplainerDashboard
AutoViz
group fairness
FastAPI
Gradio
Evidently AI
release notes
Official Docs:
Official Web:
GitHub
Tutorials
Example Notebooks
Blog
FAQs
Video Tutorials
Discussions
Changelog
User Group