powered by
gsir
gsir(x,x.new,y,ytype,ex,ey,complex.x,complex.y,r)
input predictor matrix from training set
input predictor matrix from testing set
response variables
type of response variables
tuning parameter for the Tychonoff regularized inverse for GX
tuning parameter for the Tychonoff regularized inverse for GY
tuning parameter for the Gaussian kernel in X
tuning parameter for the Gaussian kernel in Y
number of dimension
suff.pred: sufficient predictors from GSIR
obj.mat: objective matrix of GSIR
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
Li, B. (2018). Sufficient dimension reduction: Methods and applications with R. CRC Press.
# NOT RUN { n = 50; p = 5; sigma = 1; x = matrix(rnorm(n*p),n,p) ; err = rnorm(n) y = sin(0.5+(x[,1]+1)^2) + sigma*err; ex=0.01 ; ey=0.01 gsir_res <- gsir(x,x,y,"scalar",ex,ey,1,1,1) # }
Run the code above in your browser using DataLab