In the below email @steincaleb pointed out that there is a mistake in the code to calculate Q and W_inv. This mistake occurs in both the grda.default and update_grda functions.
In equation 14, W sub k inverse has a second term with (1- lambda) and Q sub k also has a (1- lambda) component. However, in your GRDA code, Q and W_inv include lambda instead of (1-lambda) while maintaining all other things the same from your paper.
Q <- diag(nk) + alpha[k] * lambda * XU %% tcrossprod(diag(Gamma_inv), XU)
W_inv <- alpha[k] * lambda * diag(Gammainv) %% crossprod(XU, solve(Q, XU)) %*% diag(Gamma_inv)
Is this correct, or should your code reflect the paper?
Copied from previous
regdiscrim
packageIn the below email @steincaleb pointed out that there is a mistake in the code to calculate
Q
andW_inv
. This mistake occurs in both thegrda.default
andupdate_grda
functions.