A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://winvector.github.io/RcppDynProg/reference/piecewise_linear.html below:

Piecewise linear fit. — piecewise_linear • RcppDynProg

Piecewise linear fit.Source: R/vtreat_coders.R

piecewise_linear.Rd

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

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
piecewise_linear("x"

,

1:8

,

c(1

,

2

,

3

,

4

,

4

,

3

,

2

,

1))

#> [1] 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 #> attr(,"approx_table") #> predXs predYs #> 1 1 2.5 #> 2 8 2.5 #> attr(,"method") #> [1] "linear"


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4