Learn R Programming

DPpack (version 0.2.2)

mapXy.linear: Linear Map Function

Description

This function implements the linear map function from data X to labels y used for linear SVM and linear regression in the form required by EmpiricalRiskMinimizationDP.CMS and EmpiricalRiskMinimizationDP.KST.

Usage

mapXy.linear(X, coeff)

Value

Matrix of values of the linear map function corresponding to each row of X.

Arguments

X

Matrix of data.

coeff

Vector or matrix of coefficients or weights.

Examples

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

Run the code above in your browser using DataLab