allda | R Documentation |
Perform dimensionality reduction using the ALLDA algorithm.
allda(
X,
y,
ncomp,
k,
r = 2,
preproc = multivarious::center(),
max_iter = 30,
tol = 1e-04,
var_retained = 0.95,
reg = 1e-05
)
X |
Data matrix of size n x d (n samples, d features). |
y |
Label vector of length n. |
ncomp |
Reduced dimension (must be less than the number of features retained by PCA). |
k |
Number of neighbors. |
r |
Parameter r (default is 2, must be > 1). |
preproc |
A preprocessing step from |
max_iter |
Maximum number of iterations (default is 30). |
tol |
Convergence tolerance (default is 1e-4). |
var_retained |
Proportion of variance to retain during PCA (default is 0.95). |
reg |
Regularization term to ensure invertibility of St (default is 1e-5). |
An S3 object of class "discriminant_projector" containing the transformation matrix W, the transformed scores, and related metadata.
Nie, F., Wang, Z., Wang, R., Wang, Z., & Li, X. (2020). Adaptive local linear discriminant analysis. ACM Transactions on Knowledge Discovery from Data (TKDD), 14(1), 1-19.
# result <- allda(X, y, ncomp = 2, k = 5)
# W <- result$rotation
# S <- result$S
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.