LDA函数
Arguments
formula:判别的公式,例如groups ~ x1 + x2 + …
data:指出数据集
prior:先验概率。如果没有指明,就用training set的比例。???
tol:判断协方差矩阵是否是奇异阵的一个标准,如果有方差小于了tol^2
,就认为协方差矩阵是奇异阵,这样就不能进行判别了。
subset:指定哪些数据是用来train model的
na.action:对缺失值的处理
method:估计协方差矩阵的方法。"moment"
for standard estimators of the mean and variance, "mle"
for MLEs, "mve"
to use cov.mve
, or "t"
for robust estimates based on a t distribution.
CV:不是很懂 If true, returns results (classes and posterior probabilities) for leave-one-out cross-validation. Note that if the prior is estimated, the proportions in the whole dataset are used.
nu:degrees of freedom for method = "t"
.