powered by
Built matrix of interval deviance costs for held-out logistic models. Fits are evaluated in-sample. One indexed.
lin_costs_logistic(x, y, w, min_seg, indices)
xcosts NumericMatix, for j>=i xcosts(i,j) is the cost of partition element [i,...,j] (inclusive).
NumericVector, x-coords of values to group.
NumericVector, values to group in order (should be in interval [0,1]).
NumericVector, weights (should be positive).
positive integer, minimum segment size (>=1).
IntegerVector, ordered list of indices to pair.
lin_costs_logistic(c(1, 2, 3, 4, 5, 6, 7), c(0, 0, 1, 0, 1, 1, 0), c(1, 1, 1, 1, 1, 1, 1), 3, 1:7)
Run the code above in your browser using DataLab