This function finds the value for \(\alpha \in [0,1]\) that empirically minimizes the average risk under a Stein loss function, which is given on page 1023 of Pang et al. (2009).

risk_stein(N, K, var_feature, num_alphas = 101, t = -1)

Arguments

N

the sample size.

K

the number of classes.

var_feature

a vector of the sample variances for each dimension.

num_alphas

The number of values used to find the optimal amount of shrinkage.

t

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.

Value

list with

  • alpha: the alpha that minimizes the average risk under a Stein loss function. If the minimum is not unique, we randomly select an alpha from the minimizers.

  • risk: the minimum average risk attained.

References

Pang, H., Tong, T., & Zhao, H. (2009). "Shrinkage-based Diagonal Discriminant Analysis and Its Applications in High-Dimensional Data," Biometrics, 65, 4, 1021-1029. http://onlinelibrary.wiley.com/doi/10.1111/j.1541-0420.2009.01200.x/abstract