Learn R Programming

psvmSDR (version 3.0.1)

npsdr_x: Reconstruct estimated sufficient predictors for new data

Description

Computes the nonlinear sufficient predictors \(\hat{\phi}(\mathbf{x})\) for a new data matrix using a previously fitted npsdr object.

This function evaluates the learned kernel-based sufficient dimension reduction (SDR) mapping on new observations. Given a fitted nonlinear SDR model \(\hat{\phi}\) estimated from npsdr(), the function computes:

$$ \hat{Z} = \hat{\phi}(X_{\text{new}}) = \Psi(X_{\text{new}})^{\top} \, \hat{V}_{1:d}, $$

where \(\Psi(\cdot)\) is the kernel feature map constructed from the training data, and \(\hat{V}_{1:d}\) contains the first \(d\) eigenvectors of the estimated working matrix \(M\). These eigenvectors span the estimated central subspace in the kernel-transformed space.

This enables users to extract sufficient predictors for downstream tasks such as visualization, classification, regression, or clustering on new data, without re-estimating the SDR model.

Usage

npsdr_x(object, newdata, d = 2)

Value

the value of the estimated nonlinear mapping \(\phi(\cdot)\) is applied to newdata \(X\) with dimension d is returned.

Arguments

object

The object from function npsdr

newdata

new data \(\mathbf{X}\)

d

structural dimensionality. d=2 is default.

Author

Jungmin Shin, c16267@gmail.com, Seung Jun Shin, sjshin@korea.ac.kr, Andreas Artemiou artemiou@uol.ac.cy

See Also

npsdr

Examples

Run this code
# \donttest{
set.seed(1)
n <- 200; n.new <- 300
p <- 5;
h <- 20;
x <- matrix(rnorm(n*p, 0, 2), n, p)
y <- 0.5*sqrt((x[,1]^2+x[,2]^2))*(log(x[,1]^2+x[,2]^2))+ 0.2*rnorm(n)
new.x <- matrix(rnorm(n.new*p, 0, 2), n.new, p)
obj_kernel <- npsdr(x, y)
z_new <- npsdr_x(object=obj_kernel, newdata=new.x)
dim(z_new)
# }

Run the code above in your browser using DataLab