Discretizing attributes

We will now look at how to discretize attributes using Weka. First, let's explain what discretization is. Discretizing attributes means discretizing a range of numeric attributes in the dataset into nominal attributes. Hence, discretization is actually creating numeric data into categories. We will use binning for this; it skips the class attribute, if set.

Suppose that we have values from 1 to 60, and we want to categorize them into three different categories. Instead of creating numeric data, we want to create categorical data. We will create three bins. Let's create a bin for all of the values from 0 to 20, another bin for the values from 20 to 40, and a third bin for the values from 40 to 60. Every numeric data ...

Get Hands-On Artificial Intelligence with Java for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.