powered by
Calculate logistic cost of using mean of points to estimate other points in interval. Zero indexed.
const_cost_logistic(y, w, min_seg, i, j)
scalar, const cost of [i,...,j] interval (inclusive).
NumericVector, 0/1 values to group in order (should be in interval [0,1]).
NumericVector, weights (should be positive).
positive integer, minimum segment size (>=1).
integer, first index (inclusive).
integer, j>=i last index (inclusive);
const_cost_logistic(c(0.1, 0.1, 0.2, 0.2), c(1, 1, 1, 1), 1, 0, 3)
Run the code above in your browser using DataLab