get logs and get config function in clustering model in pycaret

This recipe explains the get logs and get config function in clustering model in pycaret. The get logs function returns a table of experiment logs and the get config function retrieves the global variables created when initializing the setup function.

Recipe Objective - What are the get_logs and get_config functions in the clustering model in pycaret?

PyCaret provides the get_logs and get_config function in the clustering module.

For more related projects:-

https://www.projectpro.io/projects/data-science-projects/data-science-projects-in-python
https://www.projectpro.io/projects/data-science-projects/machine-learning-projects-in-python

get_logs function with Example:-

PyCaret provides "pycaret.clustering.get_logs()" function.

The get_logs function returns a table of experiment logs. Only works when log_experiment is True when initializing the setup function.

from pycaret.datasets import get_data
jewll = get_data('jewellery')
# importing clustering module
from pycaret.clustering import *
# initialize the setup
setup_name = setup(data = jewll, log_experiment = True)
# k_means clustering
k_m = create_model('kmeans')
get_log = get_logs()
get_log

get_config function with Example:-

PyCaret provides "pycaret.clustering.get_config()" function. The get_config function retrieves the global variables created when initializing the setup function.

X: Transformed dataset (X)

data_before_preprocess: data before preprocessing

seed: random state set through session_id

prep_pipe: Transformation pipeline configured through the setup

n_jobs_param: n_jobs parameter used in model training

html_param: html_param configured through setup

create_model_container: results grid storage container

from pycaret.datasets import get_data
jewll = get_data('jewellery')
# importing clustering module
from pycaret.clustering import *
# initialize the setup
setup_name = setup(data = jewll)
X = get_config('X')

What Users are saying..

profile image

Savvy Sahai

Data Science Intern, Capgemini
linkedin profile url

As a student looking to break into the field of data engineering and data science, one can get really confused as to which path to take. Very few ways to do it are Google, YouTube, etc. I was one of... Read More

Relevant Projects

Learn How to Build PyTorch Neural Networks from Scratch
In this deep learning project, you will learn how to build PyTorch neural networks from scratch.

Build Regression Models in Python for House Price Prediction
In this Machine Learning Regression project, you will build and evaluate various regression models in Python for house price prediction.

AWS Project to Build and Deploy LSTM Model with Sagemaker
In this AWS Sagemaker Project, you will learn to build a LSTM model on Sagemaker for sales forecasting while analyzing the impact of weather conditions on Sales.

Loan Eligibility Prediction using Gradient Boosting Classifier
This data science in python project predicts if a loan should be given to an applicant or not. We predict if the customer is eligible for loan based on several factors like credit score and past history.

Image Segmentation using Mask R-CNN with Tensorflow
In this Deep Learning Project on Image Segmentation Python, you will learn how to implement the Mask R-CNN model for early fire detection.

Learn Object Tracking (SOT, MOT) using OpenCV and Python
Get Started with Object Tracking using OpenCV and Python - Learn to implement Multiple Instance Learning Tracker (MIL) algorithm, Generic Object Tracking Using Regression Networks Tracker (GOTURN) algorithm, Kernelized Correlation Filters Tracker (KCF) algorithm, Tracking, Learning, Detection Tracker (TLD) algorithm for single and multiple object tracking from various video clips.

Avocado Machine Learning Project Python for Price Prediction
In this ML Project, you will use the Avocado dataset to build a machine learning model to predict the average price of avocado which is continuous in nature based on region and varieties of avocado.

Build ARCH and GARCH Models in Time Series using Python
In this Project we will build an ARCH and a GARCH model using Python

Skip Gram Model Python Implementation for Word Embeddings
Skip-Gram Model word2vec Example -Learn how to implement the skip gram algorithm in NLP for word embeddings on a set of documents.

Azure Text Analytics for Medical Search Engine Deployment
Microsoft Azure Project - Use Azure text analytics cognitive service to deploy a machine learning model into Azure Databricks