LinearDiscriminantAnalysis validation ledger#
Status: validated; transformer only; no classifier API.
Authority: Fisher (1936) and Rao’s multiclass canonical extension.
Scatter definitions:
Sw=sum_c sum_i(x_ci-mu_c)(x_ci-mu_c)^TandSb=sum_c n_c(mu_c-mu)(mu_c-mu)^T, with no denominator because the common factor cancels in the generalized eigenproblem.Solver: solve
Sb v=lambda Sw von the numerical range ofSw. The optional documented ridge isregularization*trace(Sw)/p; whentrace(Sw)=0, its explicit fallback scale istrace(Sw+Sb)/p. Zero means exactly zero. IfSbhas energy innull(Sw)at zero regularization, the Fisher quotient has infinite directions and fitting fails rather than silently discarding them.The null-space test projects weighted class-mean contrasts before squaring them. Reported class means are computed from each class directly.
Dimensional limit: at most
min(number_of_classes-1, p)and no more than the solved denominator rank. Singular unsupported requests fail explicitly.Evidence: generalized-eigen residual, isotropic two-class direction, label recoding invariance, class/shape errors, and rank diagnostics. Compare discriminant projectors, never eigenvector signs.
Complexity:
O(np^2 + p^3 + n log n + Ln)time andO(np + p^2)peak memory; symbols follow the method catalog. Rdimtools is not an oracle.