mapXy.gr.linear: Linear Map Function Gradient

View source: R/StatModels.R

mapXy.gr.linearR Documentation

Linear Map Function Gradient

Description

This function implements the gradient of the linear map function with respect to coeff used for linear SVM and linear regression in the form required by EmpiricalRiskMinimizationDP.CMS and EmpiricalRiskMinimizationDP.KST.

Usage

mapXy.gr.linear(X, coeff)

Arguments

X

Matrix of data.

coeff

Vector or matrix of coefficients or weights.

Value

Matrix of values of the gradient of the linear map function with respect to each value of coeff.

Examples

  X <- matrix(c(1,2,3,4,5,6),nrow=2)
  coeff <- c(0.5,-1,2)
  mapXy.gr.linear(X,coeff)


DPpack documentation built on Oct. 20, 2024, 9:07 a.m.