A RetroSearch Logo

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

Search Query:

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

lin_costs — lin_costs • RcppDynProg

Built matrix of interval costs for held-out linear models. One indexed.

lin_costs(x, y, w, min_seg, indices)
Arguments x

NumericVector, x-coords of values to group.

y

NumericVector, values to group in order.

w

NumericVector, weights.

min_seg

positive integer, minimum segment size (>=1).

indices

IntegerVector, ordered list of indices to pair.

Value

xcosts NumericMatix, for j>=i xcosts(i,j) is the cost of partition element [i,...,j] (inclusive).

Examples
lin_costs(c(1

,

2

,

3

,

4)

,

c(1

,

2

,

2

,

1)

,

c(1

,

1

,

1

,

1)

,

1

,

1:4)

#> [,1] [,2] [,3] [,4] #> [1,] 1.797693e+308 5.000038e-01 2.250203e+00 6.576132e+00 #> [2,] 5.000038e-01 1.797693e+308 3.611067e-01 2.250398e+00 #> [3,] 2.250203e+00 3.611067e-01 1.797693e+308 3.043395e+00 #> [4,] 6.576132e+00 2.250398e+00 3.043395e+00 1.797693e+308


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