gsave: gsave

Description Usage Arguments Value References Examples

View source: R/gsave.R

Description

gsave

Usage

1
gsave(x,x.new,y,ytype,ex,ey,comx,comy,r)

Arguments

x

input predictor matrix from training set

x.new

input predictor matrix from testing set

y

response variables

ytype

type of response variables

ex

tuning parameter for the Tychonoff reguralized inverse for GX

ey

tuning parameter for the Tychonoff reguralized inverse for GY

comx

tuning parameter for the Gaussian kernel in X

comy

tuning parameter for the Gaussian kernel in Y

r

number of dimension

Value

pred: sufficient predictors from GSAVE

obj.mat: objective matrix of GSAVE

eig.val: the first r eigenvalues from the eigendecomposition of the objective matrix

eig.vec: the first r eigenvectors from the eigendecomposition of the objective matrix

References

Li, B. (2018). Sufficient dimension reduction: Methods and applications with R. CRC Press.

Examples

1
2
3
4
n = 50; p = 5; sigma = 1;
x = matrix(rnorm(n*p),n,p) ; err = rnorm(n)
y = x[,1]/(0.5+(x[,1]+1)^2) + sigma*err; ex=0.01 ; ey=0.01
gsave_res <- gsave(x,x,y,"scalar",ex,ey,1,1,1)

nsdr documentation built on June 3, 2021, 9:06 a.m.

Related to gsave in nsdr...