Never Blindly Go for Random Forest Algorithm

kartikey_bartwal
2 min readApr 19, 2022

Data are just summaries of thousands of stories

A data scientist has many options in machine learning algorithms. Each one is unique yet almost all of them are creative. However, beginner and even professional data scientists are doing a big blunder by always opting for random forest.

No doubt Random Forest is smart and highly capable, but it still is unprofessional to use it everywhere. We can’t go and put that algorithm in any supervised machine learning problem.

There are plenty of instances where even the simplest of simplest algorithms like K-NN and linear regression have outclassed everyone else.

A Complete Flow Chart of ML Algorithms

A data scientist was working on a diabetes prediction model. In his project even after loads of hyperparameter tuning the Random Forest Classifier was no match for a default untuned logistic regression. Yes, that data scientist was me :)

It was honestly quite surprising as I spent days tuning my random forest model but got no major reward. And then comes a default logistic regression and just how it overwhelms with a drip…

The Diabetes Project being referred to https://www.kaggle.com/datasets/mathchi/diabetes-data-set

An appropriate mechanism for choosing your model could be:

Analyzing the dataset properly. Understanding the working of each and every algorithm properly. Studying pair plot graphs properly, studying each column properly, and then making a priority order of models with respect to which seems most appropriate for your target dataset.

Then depending on the amount of time you have, choose the top 3 or 2 most priority models. Now fully optimize those modals and finally choose the one which is performing the best.

Ps: This is my way of choosing the model for my target dataset. There are many other ways for the same.

An important thing to remember is that one must enjoy the process of model selection and building. Why? Because it is fun! Once you start getting the hang of it, you will start getting tons of pleasure hormones in your work.

Thank You!

--

--