create_earthbreaks: Create breaks using earth (i.e. MARS)

Description Usage Arguments Value See Also Examples

Description

Create breaks using earth (i.e. MARS)

Usage

1
create_earthbreaks(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
earth_breaks <- create_breaks(x=iris$Sepal.Length, y=iris$Sepal.Width, method="earth")
create_bins(iris$Sepal.Length, earth_breaks)

Example output

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

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