lin_cost_logistic: lin_cost_logistic logistic deviance pricing

View source: R/RcppExports.R

lin_cost_logisticR Documentation

lin_cost_logistic logistic deviance pricing

Description

Calculate deviance cost of using logistic model fit on points to estimate other points in the interval. Fits are evaluated in-sample. Zero indexed.

Usage

lin_cost_logistic(x, y, w, min_seg, i, j)

Arguments

x

NumericVector, x-coords of values to group.

y

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

w

NumericVector, weights (positive).

min_seg

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

i

integer, first index (inclusive).

j

integer, j>=i last index (inclusive);

Value

scalar, linear cost of [i,...,j] interval (inclusive).

Examples


lin_cost_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, 0, 6)


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