denoiselabels {rdetools} | R Documentation |
The function denoises labels of a dataset by projecting them to the d
first kernel pca principal directions
if d
is not 0. If d
is 0 the function returns a matrix containing the projected labels for each
dimension in each column.
The function is primarily an auxiliary function for the rde functions, and it should not be necessary to call it
by hand, because rde will do this for you (see examples).
denoiselabels(d, eigvec, kpc, regression = TRUE)
d |
number of leading kernel pca principal directions to project the labels to or 0, if a matrix should be returned which contains the denoised labels for each dimension |
eigvec |
eigenvectors of the kernel matrix |
kpc |
kernel pca coefficients |
regression |
set this to TRUE, if the data should be handled as data of a regression problem and to FALSE in case of a classification problem |
denoised version of the labels or a matrix with denoised labels for each dimension in its columns if d
was 0.
Jan Saputra Mueller
## example with sinc data d <- sincdata(100, 0.7) # generate sinc data K <- rbfkernel(d$X) # calculate rbf kernel matrix # rde, return also denoised labels r <- rde(K, d$y, est_y = TRUE) r$yh # denoised labels