Skip to main content

PyCaret - the open-source, low-code machine learning framework

🎉🎉🎉 PyCaret 3.5.0 is now available! 🎉🎉🎉

PyCaret is a low-code, end-to-end ML and model management tool for the experimentation cycle.

PyCaret provides low-code APIs for state-of-art AI frameworks such as scikit-learn, XGBoost, LightGBM, CatBoost, and more.

This is the active community fork of the pycaret package: community owned, professionally maintained, with a permissive license, and published under the PyPI name pycaret-core. It is maintained in direct continuity of pycaret 3.

Documentation · Tutorials · Release Notes
Open Source License GC.OS Sponsored
Tutorials Binder
Community !discord !slack
CI/CD github-actions readthedocs
Code !pypi !python-versions !black
Downloads Downloads Downloads Downloads

alt text

Welcome to PyCaret

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.

In comparison with the other open-source machine learning libraries, PyCaret is an alternate low-code library that can be used to replace hundreds of lines of code with few lines only. This makes experiments exponentially fast and efficient. PyCaret is essentially a Python wrapper around several machine learning libraries and frameworks such as scikit-learn, XGBoost, LightGBM, CatBoost, Optuna, Hyperopt, Ray, and few more.

The design and simplicity of PyCaret are inspired by the emerging role of citizen data scientists, a term first used by Gartner. Citizen Data Scientists are power users who can perform both simple and moderately sophisticated analytical tasks that would previously have required more technical expertise. PyCaret was inspired by the caret library in R programming language.

🚀 Installation

🌐 Option 1: Install via PyPi

PyCaret is tested and supported on 64-bit systems with:

  • Python 3.10, 3.11, 3.12 and 3.13
  • Ubuntu 16.04 or later
  • Windows 7 or later

You can install PyCaret with Python's pip package manager:

# install pycaret
pip install pycaret-core

PyCaret's default installation will not install all the optional dependencies automatically. Depending on the use case, you may be interested in one or more extras:

# install analysis extras
pip install pycaret-core[analysis]

# models extras
pip install pycaret-core[models]

# install tuner extras
pip install pycaret-core[tuner]

# install mlops extras
pip install pycaret-core[mlops]

# install parallel extras
pip install pycaret-core[parallel]

# install test extras
pip install pycaret-core[test]

# install dev extras
pip install pycaret-core[dev]

##

# install multiple extras together
pip install pycaret-core[analysis,models]

If you want to install everything including all the optional dependencies:

# install full version
pip install pycaret-core[full]

📄 Option 2: Build from Source

Install the development version of the library directly from the source. The API may be unstable. It is not recommended for production use.

pip install git+https://github.com/sktime/pycaret.git --upgrade

📦 Option 3: Docker

Docker creates virtual environments with containers that keep a PyCaret installation separate from the rest of the system. PyCaret docker comes pre-installed with a Jupyter notebook. It can share resources with its host machine (access directories, use the GPU, connect to the Internet, etc.). The PyCaret Docker images are always tested for the latest major releases.

# default version
docker run -p 8888:8888 pycaret/slim

# full version
docker run -p 8888:8888 pycaret/full

🏃‍♂️ Quickstart

1. Functional API

# Classification Functional API Example

# loading sample dataset
from pycaret.datasets import get_data
data = get_data('juice')

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

# model training and selection
best = compare_models()

# evaluate trained model
evaluate_model(best)

# predict on hold-out/test set
pred_holdout = predict_model(best)

# predict on new data
new_data = data.copy().drop('Purchase', axis = 1)
predictions = predict_model(best, data = new_data)

# save model
save_model(best, 'best_pipeline')

2. OOP API

# Classification OOP API Example

# loading sample dataset
from pycaret.datasets import get_data
data = get_data('juice')

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

# model training and selection
best = s.compare_models()

# evaluate trained model
s.evaluate_model(best)

# predict on hold-out/test set
pred_holdout = s.predict_model(best)

# predict on new data
new_data = data.copy().drop('Purchase', axis = 1)
predictions = s.predict_model(best, data = new_data)

# save model
s.save_model(best, 'best_pipeline')

📁 Modules

Classification

Functional API OOP API

Regression

Functional API OOP API

Time Series

Functional API OOP API

Clustering

Functional API OOP API

Anomaly Detection

Functional API OOP API

👥 Who should use PyCaret?

PyCaret is an open source library that anybody can use. In our view the ideal target audience of PyCaret is:

  • 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.

🎮 Training on GPUs

To train models on the GPU, simply pass use_gpu = True in the setup function. There is no change in the use of the API; however, in some cases, additional libraries have to be installed. The following models can be trained on GPUs:

  • Extreme Gradient Boosting
  • CatBoost
  • Light Gradient Boosting Machine requires GPU installation
  • Logistic Regression, Ridge Classifier, Random Forest, K Neighbors Classifier, K Neighbors Regressor, Support Vector Machine, Linear Regression, Ridge Regression, Lasso Regression requires cuML >= 0.15

🖥️ PyCaret Intel sklearnex support

You can apply Intel optimizations for machine learning algorithms and speed up your workflow. To train models with Intel optimizations use sklearnex engine. There is no change in the use of the API, however, installation of Intel sklearnex is required:

pip install scikit-learn-intelex

🤝 Contributors

📝 License

PyCaret is completely free and open-source and licensed under the MIT license.

ℹ️ More Information

Important Links Description
:loudspeaker: Discord Discord community and community discussions
:star: Tutorials Tutorials developed and maintained by core developers
:books: Documentation API docs
:tv: Videos Video resources
✈️ Cheat sheet Community Cheat sheet
:hammer_and_wrench: Release Notes Release Notes

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycaret_core-3.5.0.tar.gz (507.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycaret_core-3.5.0-py3-none-any.whl (494.8 kB view details)

Uploaded Python 3

File details

Details for the file pycaret_core-3.5.0.tar.gz.

File metadata

  • Download URL: pycaret_core-3.5.0.tar.gz
  • Upload date:
  • Size: 507.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pycaret_core-3.5.0.tar.gz
Algorithm Hash digest
SHA256 5478a0fd201584d261ab32e151586b0401f348bf5005eb9b0e69221cfc94c1f2
MD5 8473679dcf5e7fd2554361387782edf3
BLAKE2b-256 9bbd88bef274425e831b064993edec9a11c71675c51c38e7b5bc13b702b44af5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycaret_core-3.5.0.tar.gz:

Publisher: release.yml on sktime/pycaret

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycaret_core-3.5.0-py3-none-any.whl.

File metadata

  • Download URL: pycaret_core-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 494.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pycaret_core-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33732da6305e0aeb2f3f852952925c6976cd451bf391b4d76b06a86e1a714492
MD5 45b9a08be59482eee170ca166d6519a0
BLAKE2b-256 af391748c15d7308f081d595fc9f5136c54d75df4cbafef9717197204e57ce6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycaret_core-3.5.0-py3-none-any.whl:

Publisher: release.yml on sktime/pycaret

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page