View source: R/vtreat_coders.R
piecewise_constant_coder | R Documentation |
Build a piecewise constant fit coder with some parameters bound in.
piecewise_constant_coder(
penalty = 1,
min_n_to_chunk = 1000,
min_seg = 10,
max_k = 1000
)
penalty |
per-segment cost penalty. |
min_n_to_chunk |
minimum n to subdivied problem. |
min_seg |
positive integer, minimum segment size. |
max_k |
maximum segments to divide into. |
a vtreat coder
coder <- piecewise_constant_coder(min_seg = 1)
coder("x", 1:8, c(-1, -1, -1, -1, 1, 1, 1, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.