SlideShare a Scribd company logo
Introduction to PyCaret and
installation
What is PyCaret?
• PyCaret is an open-source, low-code machine learning
library in Python that automates machine learning
workflows.
• PyCaret can be used to replace hundreds of lines of
code with few lines only. You spend less time coding
and more time on analysis
• PyCaret is essentially a Python wrapper around
several machine learning libraries and frameworks
such as scikit-learn, XGBoost, LightGBM, CatBoost,
and few more.
PyCaret is ideal for:
• Experienced Data Scientists who want to increase productivity.
• Citizen Data Scientists who prefer a low code machine learning solution.
• Data Science Professionals who want to build rapid prototypes.
• Data Science and Machine Learning students and enthusiasts.
Preprocessing (setup)
Data Preparation Scale and
Transform
Feature
Engineering
Feature Selection
• Missing values
• Data Types
• One-Hot Encoding
• Ordinal Encoding
• Cardinal Encoding
• Handle Unknown Levels
• Target Imbalance
• Remove outliers
• Normalize
• Feature Transform
• Target Transform
• Feature interaction
• Polynomial Features
• Group Features
• Bin Numeric Features
• Combine Rare Levels
• Create Clusters
• Feature Selection
• Remove Multicollinearity
• Principal Component Analysis
• Ignore Low Variance
Model training
PyCaret trains multiple models simultaneously and outputs a table comparing
the performance of each model by considering a few performance metrics.
• Creating models: create_model(‘dt’, fold=n, …)
• Comparing models: compare_models(n_select = n, sort=‘Accuracy’, …)
• Tuning hyperparameters: tune_model(dt, custom_grid: Optional, …)
List of models (Regression)
List of models (Classification)
List of models (Clustering)
List of models (Anomaly Detection)
Analysis and interpretability
My_model = create_model(‘Model_name’)
• plot_model(my_model)
• interpret_model(model)
Finalize, Predict, Save and Deploy model
My_model = create_model(‘Model_name’)
• finalize_model(my_model)
• predict_model(my_model)
• save_model(my_model)
• deploy_model(model)
❑ Finalize: This function trains a given estimator on the entire dataset including the
holdout set
❑ predict: This function makes predictions on the test data set.
❑ Save: This function saves the transformation pipeline and trained model object
into the current working directory as a pickle file for later use (load_model)
❑ Deploy: This function deploys the transformation pipeline and trained model on
cloud.
Workflow
• PyCaret offers both supervised and unsupervised workflow
Classification Regression
Workflow
• PyCaret offers both supervised and unsupervised workflow
Clustering Anomaly detection
Installation
• The most efficient way of installing PyCaret is through a virtual environment!
Here are the steps:
1. Install anaconda https://www.anaconda.com/products/distribution
2. Create a conda environment: conda create --name yourenvname python=3.8
3. Activate conda environment: conda activate yourenvname
4. Install pycaret 3.0: pip install pycaret[full]
5. Create notebook kernel:
python -m ipykernel install --user --name yourenvname --display-name "display-name“
Important Links
⭐ Tutorials New to PyCaret? Checkout our official notebooks!
📋 Example Notebooks Example notebooks created by community.
📙 Official Blog Tutorials and articles by contributors.
📚 Documentation The detailed API docs of PyCaret
📺 Video Tutorials Our video tutorial from various events.
✈️ Cheat sheet Cheat sheet for all functions across modules.
📢 Discussions Have questions? Engage with community and contributors.
🛠️ Changelog Changes and version history.
🌳 Roadmap PyCaret's software and community development plan.
PyCaret Time Series Module
⭐ Time Series Quickstart Get started with Time Series Analysis
📚 Time Series Notebooks
New to Time Series? Checkout our official (detailed)
notebooks!
📺 Time Series Video Tutorials Our video tutorial from various events.
❓ Time Series FAQs Have questions? Queck out the FAQ's
🛠️ Time Series API Interface The detailed API interface for the Time Series Module
🌳 Time Series Features and Roadmap PyCaret's software and community development plan.
PyCaret new time series module is now available with the main pycaret
installation. Staying true to simplicity of PyCaret, it is consistent with the
existing API and fully loaded with functionalities
Practical example in Python
Now let’s look at some practical examples in Python!
https://github.com/PJalgotrader/platforms-and-tools/tree/main/PyCaret

More Related Content

PDF
Machine Learning with PyCaret
PDF
Machine Learning with PyCarent + MLflow
PDF
The caret package is a unified interface to a large number of predictive mode...
PPTX
Data analysis with pandas and scikit-learn
PDF
Health Analytics with Python: A Comprehensive Guide for 2024 Van Der Post
DOCX
Predicting rainfall with data science in python
PDF
Health Analytics with Python: A Comprehensive Guide for 2024 Van Der Post
PDF
Scikit-learn and nilearn: Democratisation of machine learning for brain imaging
Machine Learning with PyCaret
Machine Learning with PyCarent + MLflow
The caret package is a unified interface to a large number of predictive mode...
Data analysis with pandas and scikit-learn
Health Analytics with Python: A Comprehensive Guide for 2024 Van Der Post
Predicting rainfall with data science in python
Health Analytics with Python: A Comprehensive Guide for 2024 Van Der Post
Scikit-learn and nilearn: Democratisation of machine learning for brain imaging

Similar to PyCaret_PedramJahangiryTUTORIALPYTHON.pdf (20)

PPTX
Building Data Scientists
PDF
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...
PDF
Caret and zoon: machine learning, ecology and domain specific package systems
PDF
Health Analytics with Python: A Comprehensive Guide for 2024 Van Der Post
PPT
VTU technical seminar 8Th Sem on Scikit-learn
PDF
Mastering pandas 1st Edition Femi Anthony
PDF
Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael Varoquaux
PDF
Python Machine Learning Cookbook Early Release 1st Ed Chris Albon
PPTX
Python for Machine Learning_ A Comprehensive Overview.pptx
PDF
Python Advanced Predictive Analytics Kumar Ashish
PDF
Hands-on - Machine Learning using scikitLearn
PDF
2015 03-28-eb-final
PDF
Akhil lab.pdfkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Reasons To Consider Python For Your Healthcare Applications.pdf
PDF
Download full ebook of Mastering Pandas Femi Anthony instant download pdf
PPTX
Mini for management of patient mannagemnt system with tkinetr Project PPT.pptx
PDF
Data mining with caret package
PPTX
Chapter 5 Introduction to Machine Learning with Scikit-learn.pptx
PDF
Econometrics for python, how to deal with data
PPTX
Hands-on Machine Learning Using Healthcare
Building Data Scientists
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...
Caret and zoon: machine learning, ecology and domain specific package systems
Health Analytics with Python: A Comprehensive Guide for 2024 Van Der Post
VTU technical seminar 8Th Sem on Scikit-learn
Mastering pandas 1st Edition Femi Anthony
Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael Varoquaux
Python Machine Learning Cookbook Early Release 1st Ed Chris Albon
Python for Machine Learning_ A Comprehensive Overview.pptx
Python Advanced Predictive Analytics Kumar Ashish
Hands-on - Machine Learning using scikitLearn
2015 03-28-eb-final
Akhil lab.pdfkkkkkkkkkkkkkkkkkkkkkkkkkkk
Reasons To Consider Python For Your Healthcare Applications.pdf
Download full ebook of Mastering Pandas Femi Anthony instant download pdf
Mini for management of patient mannagemnt system with tkinetr Project PPT.pptx
Data mining with caret package
Chapter 5 Introduction to Machine Learning with Scikit-learn.pptx
Econometrics for python, how to deal with data
Hands-on Machine Learning Using Healthcare
Ad

Recently uploaded (20)

PDF
annual-report-2024-2025 original latest.
PPTX
Database Infoormation System (DBIS).pptx
PPTX
Introduction to Knowledge Engineering Part 1
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PDF
Fluorescence-microscope_Botany_detailed content
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PDF
Business Analytics and business intelligence.pdf
PDF
Mega Projects Data Mega Projects Data
annual-report-2024-2025 original latest.
Database Infoormation System (DBIS).pptx
Introduction to Knowledge Engineering Part 1
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Clinical guidelines as a resource for EBP(1).pdf
ISS -ESG Data flows What is ESG and HowHow
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
oil_refinery_comprehensive_20250804084928 (1).pptx
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Fluorescence-microscope_Botany_detailed content
.pdf is not working space design for the following data for the following dat...
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Business Analytics and business intelligence.pdf
Mega Projects Data Mega Projects Data
Ad

PyCaret_PedramJahangiryTUTORIALPYTHON.pdf

  • 1. Introduction to PyCaret and installation
  • 2. What is PyCaret? • PyCaret is an open-source, low-code machine learning library in Python that automates machine learning workflows. • PyCaret can be used to replace hundreds of lines of code with few lines only. You spend less time coding and more time on analysis • PyCaret is essentially a Python wrapper around several machine learning libraries and frameworks such as scikit-learn, XGBoost, LightGBM, CatBoost, and few more.
  • 3. PyCaret is ideal for: • Experienced Data Scientists who want to increase productivity. • Citizen Data Scientists who prefer a low code machine learning solution. • Data Science Professionals who want to build rapid prototypes. • Data Science and Machine Learning students and enthusiasts.
  • 4. Preprocessing (setup) Data Preparation Scale and Transform Feature Engineering Feature Selection • Missing values • Data Types • One-Hot Encoding • Ordinal Encoding • Cardinal Encoding • Handle Unknown Levels • Target Imbalance • Remove outliers • Normalize • Feature Transform • Target Transform • Feature interaction • Polynomial Features • Group Features • Bin Numeric Features • Combine Rare Levels • Create Clusters • Feature Selection • Remove Multicollinearity • Principal Component Analysis • Ignore Low Variance
  • 5. Model training PyCaret trains multiple models simultaneously and outputs a table comparing the performance of each model by considering a few performance metrics. • Creating models: create_model(‘dt’, fold=n, …) • Comparing models: compare_models(n_select = n, sort=‘Accuracy’, …) • Tuning hyperparameters: tune_model(dt, custom_grid: Optional, …)
  • 6. List of models (Regression)
  • 7. List of models (Classification)
  • 8. List of models (Clustering)
  • 9. List of models (Anomaly Detection)
  • 10. Analysis and interpretability My_model = create_model(‘Model_name’) • plot_model(my_model) • interpret_model(model)
  • 11. Finalize, Predict, Save and Deploy model My_model = create_model(‘Model_name’) • finalize_model(my_model) • predict_model(my_model) • save_model(my_model) • deploy_model(model) ❑ Finalize: This function trains a given estimator on the entire dataset including the holdout set ❑ predict: This function makes predictions on the test data set. ❑ Save: This function saves the transformation pipeline and trained model object into the current working directory as a pickle file for later use (load_model) ❑ Deploy: This function deploys the transformation pipeline and trained model on cloud.
  • 12. Workflow • PyCaret offers both supervised and unsupervised workflow Classification Regression
  • 13. Workflow • PyCaret offers both supervised and unsupervised workflow Clustering Anomaly detection
  • 14. Installation • The most efficient way of installing PyCaret is through a virtual environment! Here are the steps: 1. Install anaconda https://www.anaconda.com/products/distribution 2. Create a conda environment: conda create --name yourenvname python=3.8 3. Activate conda environment: conda activate yourenvname 4. Install pycaret 3.0: pip install pycaret[full] 5. Create notebook kernel: python -m ipykernel install --user --name yourenvname --display-name "display-name“
  • 15. Important Links ⭐ Tutorials New to PyCaret? Checkout our official notebooks! 📋 Example Notebooks Example notebooks created by community. 📙 Official Blog Tutorials and articles by contributors. 📚 Documentation The detailed API docs of PyCaret 📺 Video Tutorials Our video tutorial from various events. ✈️ Cheat sheet Cheat sheet for all functions across modules. 📢 Discussions Have questions? Engage with community and contributors. 🛠️ Changelog Changes and version history. 🌳 Roadmap PyCaret's software and community development plan.
  • 16. PyCaret Time Series Module ⭐ Time Series Quickstart Get started with Time Series Analysis 📚 Time Series Notebooks New to Time Series? Checkout our official (detailed) notebooks! 📺 Time Series Video Tutorials Our video tutorial from various events. ❓ Time Series FAQs Have questions? Queck out the FAQ's 🛠️ Time Series API Interface The detailed API interface for the Time Series Module 🌳 Time Series Features and Roadmap PyCaret's software and community development plan. PyCaret new time series module is now available with the main pycaret installation. Staying true to simplicity of PyCaret, it is consistent with the existing API and fully loaded with functionalities
  • 17. Practical example in Python Now let’s look at some practical examples in Python! https://github.com/PJalgotrader/platforms-and-tools/tree/main/PyCaret