discretize_on_values
discretize_on_values
Discretize column by binning its values using explicitly specified cuts points.
Each bin can optionally be assigned a label.
input
column[number]
requiredA quantitative column to discretize.
output
column[category]
requiredA new categorical column with categories corresponding to discretized bins.
cuts
array[number]
default: "[0, 0.5, 1]"Points/values used to cut the quantitative column into bins.
labels
array[string]
default: "['low', 'high']"Names for the resulting bins. Important: Note that cutting a series of values in 3 places creates 4 bins..
add_extremes
boolean
default: "true"Whether to automatically include the minimum and maximum values of the column as cut points.
include_right
boolean
default: "true"Whether the intervals are right-inclusive, i.e. of the form (x1, x2]
, or left-inclusive [x1, x2)
.
include_lowest
boolean
Whether the first interval should be left-inclusive or not.
Was this page helpful?