ramhiser / sparsediscrim

Sparse and Regularized Discriminant Analysis in R
Other
15 stars 5 forks source link

prior option Incorrectly Documented #47

Open DarioS opened 6 years ago

DarioS commented 6 years ago

It is documented as

prior vector with prior probabilities for each class. If NULL (default), then equal probabilities are used.

However, the code uses probabilities proportional to class size in diag_estimates if not user-specified which dlda depends on to do calculations.

  if (is.null(prior)) {
    prior <- as.vector(table(y) / length(y))
}

Also, dlda has ... which is not passed to diag_estimates which means it's not possible to change est_mean to "tong", for example.