Learn R Programming

RcppDynProg (version 0.2.1)

piecewise_linear: Piecewise linear fit.

Description

vtreat custom coder based on RcppDynProg::solve_for_partition().

Usage

piecewise_linear(varName, x, y, w = NULL)

Arguments

varName

character, name of variable to work on.

x

numeric, input values.

y

numeric, values to estimate.

w

numeric, weights.

Examples

Run this code

piecewise_linear("x", 1:8, c(1, 2, 3, 4, 4, 3, 2, 1))

Run the code above in your browser using DataLab