create_dtbreaks: Create breaks using decision trees (recursive partitioning)

Description Usage Arguments Value See Also Examples

Description

Create breaks using decision trees (recursive partitioning)

Usage

1
create_dtbreaks(x, y, control = NULL)

Arguments

x

X is a numeric vector to be discretized

y

Y is the response vector used for calculating metrics for discretization

control

Control is used for optional parameters for the method

Value

A vector containing the breaks

See Also

create_breaks

Examples

1
2
dt_breaks <- create_breaks(iris$Sepal.Length, iris$Species, method="dt")
create_bins(iris$Sepal.Length, dt_breaks)

Example output

  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2
 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 2 3 2 3 1 3 1 1 2 2 2 2 3 2 2 3 2 2 2 3 2
 [75] 3 3 3 3 2 2 2 2 2 2 1 2 3 3 2 2 2 2 2 1 2 2 2 3 1 2 3 2 4 3 3 4 1 4 3 4 3
[112] 3 3 2 2 3 3 4 4 2 3 2 4 3 3 4 3 2 3 4 4 4 3 3 2 4 3 3 2 3 3 3 2 3 3 3 3 3
[149] 3 2

binst documentation built on May 2, 2019, 7:32 a.m.

Related to create_dtbreaks in binst...