image

Data Discretization

5.1. Introduction

In the previous chapter, you studied how to perform numerical encoding of the categorical values. In this chapter, you will see how to convert continuous numeric values into discrete intervals.

The process of converting continuous numeric values such as price, age, and weight into discrete intervals is called discretization or binning.

One of the main advantages of discretization is that it can help handle outliers. With discretization, the outliers can be placed into tail intervals along with the remaining inlier values that occur at tails. Discretization is particularly helpful in cases where you have skewed ...

Get Data Preprocessing with Python for Absolute Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.