const_costs | R Documentation |
Built matrix of total out of sample interval square error costs for held-out means. One indexed.
const_costs(y, w, min_seg, indices)
y |
NumericVector, values to group in order. |
w |
NumericVector, weights. |
min_seg |
positive integer, minimum segment size (>=1). |
indices |
IntegerVector, order list of indices to pair. |
xcosts NumericMatix, for j>=i xcosts(i,j) is the cost of partition element [i,...,j] (inclusive).
const_costs(c(1, 1, 2, 2), c(1, 1, 1, 1), 1, 1:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.