const_costs_logistic: const_costs_logistic

View source: R/RcppExports.R

const_costs_logisticR Documentation

const_costs_logistic

Description

Built matrix of interval logistic costs for held-out means. One indexed.

Usage

const_costs_logistic(y, w, min_seg, indices)

Arguments

y

NumericVector, 0/1 values to group in order (should be in interval [0,1]).

w

NumericVector, weights (should be positive).

min_seg

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

indices

IntegerVector, order list of indices to pair.

Value

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

Examples


const_costs_logistic(c(0.1, 0.1, 0.2, 0.2), c(1, 1, 1, 1), 1, 1:4)


RcppDynProg documentation built on Aug. 20, 2023, 9:07 a.m.