This function computes the shrinkage-based estimator of variance of each feature (variable) from Pang et al. (2009) for the SDLDA classifier.
var_shrinkage(N, K, var_feature, num_alphas = 101, t = -1)
the sample size.
the number of classes.
a vector of the sample variances for each feature.
The number of values used to find the optimal amount of shrinkage.
a constant specified by the user that indicates the exponent to use with the variance estimator. By default, t = -1 as in Pang et al. See the paper for more details.
a vector of the shrunken variances for each feature.
Pang, H., Tong, T., & Zhao, H. (2009). "Shrinkage-based Diagonal Discriminant Analysis and Its Applications in High-Dimensional Data," Biometrics, 65, 4, 1021-1029. https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1541-0420.2009.01200.x