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

Was this helpful?

  1. GET STARTED

Functions

All functions in PyCaret

PreviousOther setup parametersNextInitialize

Last updated 1 year ago

Was this helpful?

This function initializes the experiment in PyCaret and prepares the transformation pipeline based on all the parameters passed in the function. The setup function must be called before executing any other function. It only requires two parameters: data and target. All the other parameters are optional.

This function trains and evaluates the performance of all the models available in the model library using cross-validation. The output of this function is a scoring grid with average cross-validated scores.

This function trains and evaluates the performance of a given model using cross-validation. The output of this function is a scoring grid with cross-validated scores along with mean and standard deviation.

This function tunes the hyperparameters of a given model. The output of this function is a scoring grid with cross-validated scores of the best model. Search spaces are pre-defined with the flexibility to provide your own. The search algorithm can be random, bayesian, and a few others with the ability to scale on large clusters.

This function ensembles a given model. The output of this function is a scoring grid with cross-validated scores of the ensembled model. Two methods Bagging or Boosting can be used for ensembling.

This function trains a Soft Voting / Majority Rule classifier for given models in a list. The output of this function is a scoring grid with cross-validated scores of a Voting Classifier or Regressor.

This function trains a meta-model over given models in a list. The output of this function is a scoring grid with cross-validated scores of a Stacking Classifier or Regressor.

This function optimizes the probability threshold for a given model. It iterates over performance metrics at different probability thresholds and returns a plot with performance metrics on the y-axis and threshold on the x-axis.

This function calibrates the probability of a given model using isotonic or logistic regression. The output of this function is a scoring grid with cross-validated scores of calibrated classifier.

This function analyzes the performance of a trained model on the hold-out set. It may require re-training the model in certain cases.

This function uses ipywidgets to display a basic user interface for analyzing the performance of a trained model.

This function analyzes the predictions generated from a trained model. Most plots in this function are implemented based on the SHAP (Shapley Additive exPlanations).

This function generates the interactive dashboard for a trained model. The dashboard is implemented using the ExplainerDashboard project.

This function provides fairness-related metrics between different groups in the dataset for a given model. There are many approaches to evaluate fairness but this function uses the approach known as group fairness, which asks: which groups of individuals are at risk for experiencing harm.

This function returns the leaderboard of all models trained in the current setup.

This function assigns labels to the training dataset using the trained model. It is only available for unsupervised modules.

This function generates the label using a trained model. When unseen data is not passed, it predicts the label and score on the holdout set.

This function refits a given model on the entire dataset.

This function saves the ML pipeline as a pickle file for later use.

This function loads a previously saved pipeline.

This function saves an experiment to a pickle file.

This function loads an experiment back into Python from a pickle file.

This function generates a drift report file using the evidently library.

This function deploys the entire ML pipeline on the cloud.

This function transpiles the trained machine learning model's decision function in different programming languages such as Python, C, Java, Go, C#, etc.

This function takes an input model and creates a POST API for inference. It only creates the API and doesn't run it automatically.

This function creates a Dockerfile and requirements.txt for deploying API.

This function creates a basic gradio app for inference.

Returns the last printed scoring grid.

Return a table containing all the models available in the imported module of the model library.

This function retrieves the global variables created by the setup function.

This function resets the global variables.

Returns the table of all available metrics used for cross-validation.

Adds a custom metric to the metric container for cross-validation.

Removes a custom metric from the metric container.

This function returns the best model from all the models in the current setup.

Returns a table of experiment logs. Only works when log_experiment = True when initializing the setup function.

Obtain the current experiment object.

Set the current experiment to be used with the functional API.

💡
tune_model
ensemble_model
blend_models
stack_models
optimize_threshold
calibrate_model
setup
predict_model
finalize_model
save_model
load_model
save_experiment
load_experiment
check_drift
deploy_model
convert_model
create_api
create_docker
create_app
pull
models
get_config
set_config
get_metrics
add_metric
remove_metric
automl
get_logs
get_current_experiment
set_current_experiment
compare_models
create_model
plot_model
evaluate_model
interpret_model
dashboard
check_fairness
get_leaderboard
assign_model