You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ldaFunction(): score sign/magnitude biased toward the second class level (signed mean difference added to unsigned coefficient) #104
Because coeff is always non-negative, this calculation can bias scores toward the second factor level. For features enriched in the first (reference) class, lda.means.diff is negative, resulting in a score of (coeff - diff) / 2. In contrast, the expected LEfSe score is -(diff + coeff) / 2, where diff represents the absolute difference between class means.
When coeff is smaller than diff, the score retains its negative sign but has an incorrect magnitude. When coeff exceeds diff, the score becomes positive, incorrectly assigning the feature to the second class.
Consequently, the calculated scores can depend on the factor-level ordering rather than solely on the underlying data. This may lead to underestimated LDA scores for features enriched in the reference class, causing some features to fall below lda.threshold. Other features may be assigned to the wrong class, resulting in incorrect group labels in lefserPlot() and lefserPlotClad().
Activity
LiNk-NY commentedon Dec 1, 2026
Thanks for the issue @JamesYang1209
Would you take a look at PR #107 and provide some feedback?