vtreat
custom coder based on RcppDynProg::solve_for_partition()
.
piecewise_constant(varName, x, y, w = NULL)
varName | character, name of variable to work on. |
---|---|
x | numeric, input values. |
y | numeric, values to estimate. |
w | numeric, weights. |
#> [1] 0 0 0 0 0 0 0 0 #> attr(,"approx_table") #> predXs predYs #> 1 1 0 #> 2 8 0 #> attr(,"method") #> [1] "constant"