get logs and get config function in anomaly detection pycaret

This recipe explains the get logs and get config function in anomaly detection using pycaret. The get logs function returns a table of experiment logs and 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 anomaly detection in pycaret?

PyCaret provides the get_logs and get_config function in the anomaly detection module.

Build Expedia Hotel Recommendation System using Machine Learning

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.anomaly.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
anmly = get_data('anomaly')
# importing anomaly module
from pycaret.anomaly import *
# initialize the setup
setup_name = setup(data = anmly, log_experiment = True)
# Knn model
knn = create_model('knn')
exp_log = get_logs()
exp_log

get_config function with Example:-

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

Accessible variables:-

X: Transformed dataset (X)

data_before_preprocess: data before preprocessing

seed: random state set through session_id

prep_pipe: Transformation pipeline configured through 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

master_model_container: model storage container

display_container: results display container

exp_name_log: Name of experiment set through setup

logging_param: log_experiment param set through setup

log_plots_param: log_plots param set through setup

USI: Unique session ID parameter set through setup

gpu_param: use_gpu param configured through setup

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

What Users are saying..

profile image

Anand Kumpatla

Sr Data Scientist @ Doubleslash Software Solutions Pvt Ltd
linkedin profile url

ProjectPro is a unique platform and helps many people in the industry to solve real-life problems with a step-by-step walkthrough of projects. A platform with some fantastic resources to gain... Read More

Relevant Projects

Predictive Analytics Project for Working Capital Optimization
In this Predictive Analytics Project, you will build a model to accurately forecast the timing of customer and supplier payments for optimizing working capital.

NLP Project for Multi Class Text Classification using BERT Model
In this NLP Project, you will learn how to build a multi-class text classification model using using the pre-trained BERT model.

Loan Eligibility Prediction Project using Machine learning on GCP
Loan Eligibility Prediction Project - Use SQL and Python to build a predictive model on GCP to determine whether an application requesting loan is eligible or not.

Census Income Data Set Project-Predict Adult Census Income
Use the Adult Income dataset to predict whether income exceeds 50K yr based oncensus data.

Build CNN Image Classification Models for Real Time Prediction
Image Classification Project to build a CNN model in Python that can classify images into social security cards, driving licenses, and other key identity information.

Build Multi Class Text Classification Models with RNN and LSTM
In this Deep Learning Project, you will use the customer complaints data about consumer financial products to build multi-class text classification models using RNN and LSTM.

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.

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.

Build a Collaborative Filtering Recommender System in Python
Use the Amazon Reviews/Ratings dataset of 2 Million records to build a recommender system using memory-based collaborative filtering in Python.

Build a Graph Based Recommendation System in Python -Part 1
Python Recommender Systems Project - Learn to build a graph based recommendation system in eCommerce to recommend products.