| nmfkc.kernel | R Documentation |
nmfkc.kernel constructs a kernel matrix from covariate matrices.
It supports Gaussian, Exponential, Periodic, Linear, Normalized Linear, and Polynomial kernels.
nmfkc.kernel(
U,
V = NULL,
kernel = c("Gaussian", "Exponential", "Periodic", "Linear", "NormalizedLinear",
"Polynomial"),
...
)
U |
Covariate matrix |
V |
Covariate matrix |
kernel |
Kernel function to use. Default is |
... |
Additional arguments passed to the specific kernel function (e.g., |
Kernel matrix A(N,M).
Satoh, K. (2024). Applying Non-negative Matrix Factorization with Covariates to the Longitudinal Data as Growth Curve Model. arXiv preprint arXiv:2403.05359. https://arxiv.org/abs/2403.05359
nmfkc.kernel.gaussian, nmfkc.cv
# Example.
Y <- matrix(cars$dist,nrow=1)
U <- matrix(c(5,10,15,20,25),nrow=1)
V <- matrix(cars$speed,nrow=1)
A <- nmfkc.kernel(U,V,beta=28/1000)
dim(A)
result <- nmfkc(Y,A,rank=1)
plot(as.vector(V),as.vector(Y))
lines(as.vector(V),as.vector(result$XB),col=2,lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.