What is get config function in NLP in pycaret

This recipe explains what is get config function in NLP in pycaret. The get config function retrieves the global variables created when initializing the setup function.

Recipe Objective - What is the get_config function in NLP in pycaret?

PyCaret provides the get_config function in the NLP module.

This module is provided by the PyCaret python libraryPyCaret is an open-source, less-code machine learning python library. PyCaret automates machine learning workflow.  PyCaret library is wrapped around some machine learning libraries such as sklearn, XGBoost, LightGBM, CatBoost, spaCy, Optuna, Hyperopt, Ray, and many more.

Master the Art of Data Cleaning in 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_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:-

text: Tokenized words as a list with length = # documents

data_pandas.DataFrame containing text after all processing

corpus: List containing tuples of id to word mapping

id2word: gensim.corpora.dictionary.Dictionary

seed: random state set through session_id

target_: Name of column containing text. ‘en’ by default.

html_param: html_param configured through setup

exp_name_log: Name of the experiment set through the setup

logging_param: log_experiment param set through the setup

log_plots_param: log_plots param set through setup

USI: Unique session ID parameter set through the setup

from pycaret.datasets import get_data
kiva = get_data('kiva')
# importing NLP module
from pycaret.nlp import *
# initialize the setup
setup_name = setup(data = kiva, target = 'en')
text = get_config('text')
text

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

Natural language processing Chatbot application using NLTK for text classification
In this NLP AI application, we build the core conversational engine for a chatbot. We use the popular NLTK text classification library to achieve this.

Build a Multi Touch Attribution Machine Learning Model in Python
Identifying the ROI on marketing campaigns is an essential KPI for any business. In this ML project, you will learn to build a Multi Touch Attribution Model in Python to identify the ROI of various marketing efforts and their impact on conversions or sales..

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.

Learn to Build a Neural network from Scratch using NumPy
In this deep learning project, you will learn to build a neural network from scratch using NumPy

NLP and Deep Learning For Fake News Classification in Python
In this project you will use Python to implement various machine learning methods( RNN, LSTM, GRU) for fake news classification.

Build Customer Propensity to Purchase Model in Python
In this machine learning project, you will learn to build a machine learning model to estimate customer propensity to purchase.

Build a Text Generator Model using Amazon SageMaker
In this Deep Learning Project, you will train a Text Generator Model on Amazon Reviews Dataset using LSTM Algorithm in PyTorch and deploy it on Amazon SageMaker.

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.

Build Regression (Linear,Ridge,Lasso) Models in NumPy Python
In this machine learning regression project, you will learn to build NumPy Regression Models (Linear Regression, Ridge Regression, Lasso Regression) from Scratch.

BERT Text Classification using DistilBERT and ALBERT Models
This Project Explains how to perform Text Classification using ALBERT and DistilBERT