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.
yNumericVector, values to group in order.
wNumericVector, weights.
min_segpositive integer, minimum segment size (>=1).
indicesIntegerVector, ordered list of indices to pair.
Valuexcosts NumericMatix, for j>=i xcosts(i,j) is the cost of partition element [i,...,j] (inclusive).
Exampleslin_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