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 will become categorical data, using discretization.
We will now use the following options:
- -B<num>: This specifies...