Python PyCaret Getting Started with PyCaret 2.0














































Python PyCaret Getting Started with PyCaret 2.0



 

Getting Started with PyCaret 2.0



The first step of any machine learning experiment in PyCaret is to set up an environment by importing the relevant module and initialize the setup function by passing dataframe and name of the target variable. 

See example code:

# Import module
from pycaret.classification import *

# Initialize setup (when using Notebook environment)
clf1 = setup(data, target = 'target-variable')

# Initialize setup (outside of Notebook environment)
clf1 = setup(data, target = 'target-variable', html = False)

# Initialize setup (When using remote execution such as Kaggle / GitHub actions / CI-CD pipelines)
clf1 = setup(data, target = 'target-variable', html = False, silent = True)

Sample Output:

Figure

Output is truncated

 

All the preprocessing transformations are applied within setup function. PyCaret provides over 20 different pre-processing transformation that can be defined within setup function. Click here to learn more about PyCaret%u2019s preprocessing abilities.

Figure

In the next article, we'll learn to compare different models using PyCaret 2.0.
Until then, HAPPY PYTHONING....!!


More Articles of Aditi Kothiyal:

Name Views Likes
Python AdaBoost Mathematics Behind AdaBoost 477 1
Python PyCaret How to optimize the probability threshold % in binary classification 2357 0
Python K-means Predicting Iris Flower Species 1425 2
Python PyCaret How to ignore certain columns for model building 3437 0
Python PyCaret Experiment Logging 911 0
Python PyWin32 Open a File in Excel 1237 0
Python Guppy GSL Introduction 271 2
Python Usage of Guppy With Example 1253 2
Python Naive Bayes Tutorial 613 2
Python Guppy Recent Memory Usage of a Program 1007 2
Introduction to AdaBoost 363 1
Python AdaBoost Implementation of AdaBoost 570 1
Python AdaBoost Advantages and Disadvantages of AdaBoost 4168 1
Python K-Means Clustering Applications 398 2
Python Random Forest Algorithm Decision Trees 501 0
Python K-means Clustering PREDICTING IRIS FLOWER SPECIES 576 1
Python Random Forest Algorithm Bootstrap 565 0
Python PyCaret Util Functions 512 0
Python K-means Music Genre Classification 1937 1
Python PyWin Attach an Excel file to Outlook 1844 0
Python Guppy GSL Document and Test Example 323 2
Python Random Forest Algorithm Bagging 458 0
Python AdaBoost An Example of How AdaBoost Works 355 1
Python PyWin32 Getting Started PyWin32 1540 0
Python Naive Bayes in Machine Learning 434 2
Python PyCaret How to improve results from hyperparameter tuning by increasing "n_iter" 1888 0
Python PyCaret Getting Started with PyCaret 2.0 417 1
Python PyCaret Tune Model 1713 1
Python PyCaret Create your own AutoML software 400 0
Python PyCaret Intoduction to PyCaret 357 1
Python PyCaret Compare Models 3314 1
Python PyWin Copying Data into Excel 1329 0
Python Guppy Error: expected function body after function declarator 481 2
Python Coding Random forest classifier using xgBoost 296 0
Python PyCaret How to tune "n parameter" in unsupervised experiments 736 0
Python PyCaret How to programmatically define data types in the setup function 1498 0
Python PyCaret Ensemble Model 932 1
Python Random forest algorithm Introduction 266 0
Python k-means Clustering Example 398 1
Python PyCaret Plot Model 1460 1
Python Hamming Distance 812 0
Python Understanding Random forest algorithm 355 0
Python PyCaret Sort a Dictionary by Keys 301 0
Python Coding Random forest classifier using sklearn 413 0
Python Guppy Introduction 458 2
Python How to use Guppy/Heapy for tracking down Memory Usage 1205 2
Python AdaBoost Summary and Conclusion 285 1
Python PyCaret Create Model 427 1
Python k -means Clusturing Introduction 399 2
Python k-means Clustering With Example 409 2

Comments