Python PyCaret How to ignore certain columns for model building

Python PyCaret How to ignore certain columns for model building

How to ignore certain columns for model building

On many occasions, you have features in dataset that you do not necessarily want to remove but want to ignore for training a machine learning model. A good example would be a clustering problem where you want to ignore certain features during cluster creation but later you need those columns for analysis of cluster labels. In such cases, you can use the ignore_features parameter within the setup to ignore such features.

In the example below, we will perform a clustering experiment and we want to ignore 'Country Name' and 'Indicator Name'.

Image for post

from pycaret.clustering import *
clu1 = setup(data, ignore_features = ['Country Name', 'Indicator Name'])



More Articles of Aditi Kothiyal:

Name Views Likes
Python AdaBoost Mathematics Behind AdaBoost 515 1
Python PyCaret How to optimize the probability threshold % in binary classification 2490 0
Python K-means Predicting Iris Flower Species 1470 2
Python PyCaret How to ignore certain columns for model building 3713 0
Python PyCaret Experiment Logging 977 0
Python PyWin32 Open a File in Excel 1427 0
Python Guppy GSL Introduction 293 2
Python Usage of Guppy With Example 1343 2
Python Naive Bayes Tutorial 635 2
Python Guppy Recent Memory Usage of a Program 1042 2
Introduction to AdaBoost 384 1
Python AdaBoost Implementation of AdaBoost 597 1
Python AdaBoost Advantages and Disadvantages of AdaBoost 4403 1
Python K-Means Clustering Applications 428 2
Python Random Forest Algorithm Decision Trees 554 0
Python K-means Clustering PREDICTING IRIS FLOWER SPECIES 662 1
Python Random Forest Algorithm Bootstrap 612 0
Python PyCaret Util Functions 537 0
Python K-means Music Genre Classification 2074 1
Python PyWin Attach an Excel file to Outlook 1980 0
Python Guppy GSL Document and Test Example 339 2
Python Random Forest Algorithm Bagging 485 0
Python AdaBoost An Example of How AdaBoost Works 378 1
Python PyWin32 Getting Started PyWin32 2580 0
Python Naive Bayes in Machine Learning 460 2
Python PyCaret How to improve results from hyperparameter tuning by increasing "n_iter" 1984 0
Python PyCaret Getting Started with PyCaret 2.0 435 1
Python PyCaret Tune Model 1899 1
Python PyCaret Create your own AutoML software 425 0
Python PyCaret Intoduction to PyCaret 376 1
Python PyCaret Compare Models 3784 1
Python PyWin Copying Data into Excel 1459 0
Python Guppy Error: expected function body after function declarator 523 2
Python Coding Random forest classifier using xgBoost 325 0
Python PyCaret How to tune "n parameter" in unsupervised experiments 778 0
Python PyCaret How to programmatically define data types in the setup function 1552 0
Python PyCaret Ensemble Model 1001 1
Python Random forest algorithm Introduction 286 0
Python k-means Clustering Example 420 1
Python PyCaret Plot Model 1566 1
Python Hamming Distance 870 0
Python Understanding Random forest algorithm 376 0
Python PyCaret Sort a Dictionary by Keys 320 0
Python Coding Random forest classifier using sklearn 436 0
Python Guppy Introduction 503 2
Python How to use Guppy/Heapy for tracking down Memory Usage 1281 2
Python AdaBoost Summary and Conclusion 305 1
Python PyCaret Create Model 459 1
Python k -means Clusturing Introduction 426 2
Python k-means Clustering With Example 435 2