fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
205 stars 54 forks source link

[BUG] SAM permutation problem with unbalanced data #243

Closed zieglerSe closed 1 year ago

zieglerSe commented 1 year ago

Using unbalanced data in SAM leads to wrong results. Change in indices during permutation required.

ZimmerD commented 1 year ago

I think the faulty behavior can be caused by line 246:

(id,x.[..replicateCount1-1]),(id,x.[replicateCount2..])

Changing it to:

(id,x.[..replicateCount1-1]),(id,x.[replicateCount1..])

could fix the observed output