What is tune model function in NLP in pycaret

This recipe explains what is tune model function in NLP in pycaret

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

PyCaret provides the tune_model function in the NLP module.

Access House Price Prediction Project using Machine Learning with Source Code

For more related projects:-

https://www.dezyre.com/projects/data-science-projects/data-science-projects-in-python
https://www.dezyre.com/projects/data-science-projects/machine-learning-projects-in-python

Tune Model function with Example:-

PyCaret prvides "pycaret.anomaly.tune_model()" funtion. Tune model function tunes the "num_topics" parameter of a given model.

Available Models:-

‘lda’ - Latent Dirichlet Allocation

‘lsi’ - Latent Semantic Indexing

‘hdp’ - Hierarchical Dirichlet Process

‘rp’ - Random Projections

‘nmf’ - Non-Negative Matrix Factorization

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')
# tune model function
tuned_lda = tune_model(model = 'lda', supervised_target = 'status')
tuned_lda

Classification ID:-

‘lr’ - Logistic Regression (Default)

‘knn’ - K Nearest Neighbour

‘nb’ - Naive Bayes

‘dt’ - Decision Tree Classifier

‘svm’ - SVM - Linear Kernel

‘rbfsvm’ - SVM - Radial Kernel

‘gpc’ - Gaussian Process Classifier

‘mlp’ - Multi-Level Perceptron

‘ridge’ - Ridge Classifier

‘rf’ - Random Forest Classifier

‘qda’ - Quadratic Discriminant Analysis

‘ada’ - Ada Boost Classifier

‘gbc’ - Gradient Boosting Classifier

‘lda’ - Linear Discriminant Analysis

‘et’ - Extra Trees Classifier

‘xgboost’ - Extreme Gradient Boosting

‘lightgbm’ - Light Gradient Boosting

‘catboost’ - CatBoost Classifier

Regression ID:-

‘lr’ - Linear Regression (Default)

‘lasso’ - Lasso Regression

‘ridge’ - Ridge Regression

‘en’ - Elastic Net

‘lar’ - Least Angle Regression

‘llar’ - Lasso Least Angle Regression

‘omp’ - Orthogonal Matching Pursuit

‘br’ - Bayesian Ridge

What Users are saying..

profile image

Gautam Vermani

Data Consultant at Confidential
linkedin profile url

Having worked in the field of Data Science, I wanted to explore how I can implement projects in other domains, So I thought of connecting with ProjectPro. A project that helped me absorb this topic... Read More

Relevant Projects

Time Series Project to Build a Multiple Linear Regression Model
Learn to build a Multiple linear regression model in Python on Time Series Data

Multi-Class Text Classification with Deep Learning using BERT
In this deep learning project, you will implement one of the most popular state of the art Transformer models, BERT for Multi-Class Text Classification

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.

Stock Price Prediction Project using LSTM and RNN
Learn how to predict stock prices using RNN and LSTM models. Understand deep learning concepts and apply them to real-world financial data for accurate forecasting.

Build a Face Recognition System in Python using FaceNet
In this deep learning project, you will build your own face recognition system in Python using OpenCV and FaceNet by extracting features from an image of a person's face.

Deep Learning Project for Beginners with Source Code Part 1
Learn to implement deep neural networks in Python .

End-to-End Snowflake Healthcare Analytics Project on AWS-1
In this Snowflake Healthcare Analytics Project, you will leverage Snowflake on AWS to predict patient length of stay (LOS) in hospitals. The prediction of LOS can help in efficient resource allocation, lower the risk of staff/visitor infections, and improve overall hospital functioning.

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.

Build CNN for Image Colorization using Deep Transfer Learning
Image Processing Project -Train a model for colorization to make grayscale images colorful using convolutional autoencoders.

Build a Multi ClassText Classification Model using Naive Bayes
Implement the Naive Bayes Algorithm to build a multi class text classification model in Python.