CatBoost Regression: Break It Down For Me | by Shreya Rao | Sep, 2023



A complete (and illustrated) breakdown of the internal workings of CatBoost

Shreya RaoTowards Data Science14 min learn


19 hours in the past

CatBoost, brief for Categorical Boosting, is a strong machine studying algorithm that excels in dealing with categorical options and producing correct predictions. Historically, coping with categorical information is fairly difficult— requiring one-hot encoding, label encoding, or another preprocessing method that may distort the info’s inherent construction. To sort out this situation, CatBoost employs its personal built-in encoding system known as Ordered Goal Encoding.

Let’s see how CatBoost works in observe by constructing a mannequin to foretell how somebody may price the e book Homicide, She Texted primarily based on their common e book ranking on Goodreads and their favourite style.

We requested 6 folks to price Homicide, She Texted and picked up the opposite related details about them.

That is our present coaching dataset, which we’ll use to coach (duh) the info.

Step 1: Shuffle the dataset and Encode the Categorical Data Utilizing Ordered Goal Encoding

The best way we preprocess categorical information is central to the CatBoost algorithm. On this case, we solely have one categorical column — Favourite Style. This column is encoded (aka transformed to a discrete integer) and the way in which it’s completed varies relying on whether or not it’s a Regression or Classification downside. Since we’re coping with a Regression downside (as a result of the variable we wish to predict Homicide, She Texted Score is steady) we observe the next steps.

1 — Shuffle the dataset:

2 — Put the continual goal variable into discrete buckets: Since we’ve little or no information right here, we’ll create 2 buckets of the identical measurement to categorize the goal. (Be taught extra about find out how to create buckets right here).

We put the three smallest values of Homicide, She Texted Score in bucket 0 and the remainder in bucket 1.


Supply hyperlink

What do you think?

Written by TechWithTrends

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings


Jio Pay as you go Cellular Plans to Watch Your Favorite Netflix Reveals


Some Ideas About Labor & Capital For This Labor Day Weekend