| nmf.rrr.kernel.beta.cv | R Documentation |
nmfae.kernel.beta.cv selects the optimal beta parameter of the
kernel function by evaluating nmfae.cv for each candidate value.
The kernel matrix A = K(U, V; \beta) replaces Y_2 in the three-layer
NMF model.
When beta = NULL, candidate values are automatically generated via
nmfkc.kernel.beta.nearest.med.
nmf.rrr.kernel.beta.cv(
Y1,
rank1 = 2,
rank2 = NULL,
U,
V = NULL,
beta = NULL,
plot = TRUE,
...,
rank = NULL,
rank.encoder = NULL
)
Y1 |
Output matrix |
rank1 |
Integer. Rank of the response basis. Default is 2. |
rank2 |
Integer. Rank of the covariate basis. Default ( |
U |
Covariate matrix |
V |
Covariate matrix |
beta |
Numeric vector of candidate beta values. If |
plot |
Logical. If |
... |
Additional arguments. Kernel-specific args ( |
rank, rank.encoder |
Deprecated aliases of |
A list with components:
beta |
The beta value that minimizes the cross-validation objective. |
objfunc |
Named numeric vector of objective function values for each candidate beta. |
nmfae.cv, nmfkc.kernel,
nmfkc.kernel.beta.cv
Y <- matrix(cars$dist, nrow = 1)
U <- matrix(cars$speed, nrow = 1)
res <- nmf.rrr.kernel.beta.cv(Y, rank1 = 1, rank2 = 1, U = U,
beta = c(0.01, 0.02, 0.05), nfolds = 5)
res$beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.