---
title: Optimal binning in DataRobot
description: How DataRobot helps perform optimal binning.
---

# Optimal binning in DataRobot {: #optimal-binning-in-datarobot }

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

Got a question from a client&mdash;**does DataRobot help do optimal binning (on numeric features)?** I know that in our GAM model, DataRobot will bin each of the numeric features based on its partial dependence from an XGBoost model. Anything else that we do that I am not aware of?

<span style="color:red;font-size: 1rem"> `Robot 2`</span>

We use a decision tree to find bins.


It's pretty optimal.


It may not be perfectly optimal, but it does a good job finding the right bins.

<span style="color:red;font-size: 1rem"> `Robot 3`</span>

Single decision tree on single feature&mdash;produces leaves with at least minimum number of target values. So bins are variable size and are designed to have enough target statistics per leaf. The boundaries are just sorted splits. An XGBoost model is used to smooth the target and decision tree operate on XGB predictions.