Machine learning made easy with 'Lazy Predict'

Machine learning made easy with 'Lazy Predict'

As we all know that Machine learning has become an integral part of a Data Scientist’s life. It's a process that takes too much time, and there are multiple difficult tasks that have to be carried out to build a Machine learning model. 

After the most important and time-consuming part of the Model building which is pre-processing of data, comes the modeling part which again presents a question about which model to choose!😥

To deal with this problem of choosing a correct model that suits your problem statement, python has an amazing in-built library called ‘Lazy Predict’.

“Progress isn’t made by early risers. It’s made by lazy men trying to find easier ways to do something.”

― Robert Heinlein

What is Lazy Predict?

As the name ‘Lazy Predict’ itself suggests that we can lazily i.e. without investing much effort and time build a model that predicts the target variable. It is one of the most amazing and powerful libraries in python which helps you to semi-automate your Machine Learning task. It is simple yet effective. 

It offers features such as - Model selection, and Hyperparameter optimization that can help you get the most of your machine learning models.

It is beneficial as - It saves your time, and also Increases your productivity.

How does it work?

It works by training and understanding which models work better among all the models available in sckit-learn with just a single line of code. 

It will basically provide you with a list of models and the performance of each model on your data through which you can choose top n models and then apply hyperparameter tuning to them.

I am sure you are fascinated by now! So, let’s get started.🥳

How to install it?

pip install lazypredict        

How to import the required libraries?

No alt text provided for this image
import lazypredict
# for classification problems
from lazypredict.Supervised import LazyClassifier
# for regression problems
from lazypredict.Supervised import LazyRegressor        

Steps to be followed to complete the modeling task:

The steps to be followed for building a model using Lazy Predict are as follows:

No alt text provided for this image

Reading this documentation will give you a more clear idea about the library as the examples provided are actually quite helpful.


Happy Reading!

Thanks for this post, this post has been really helpful for my project 💯 ☺️

The strategies for improving the accuracy of ML model are quite intriguing, and I intend to try them out in one of my upcoming projects.

To view or add a comment, sign in

More articles by Sharvari Avhad

Others also viewed

Explore content categories