mixOmics icon indicating copy to clipboard operation
mixOmics copied to clipboard

Fix for Issue #214

Open Max-Bladen opened this issue 2 years ago • 2 comments

The tune.spls() function did not have any form of BiocParallel implementation which was quite misleading for users. As this function is likely to be more frequently used, this was a priority to resolve.

The main body of the function was adjusted such that now the internal function iter_keep.vals() iterates over all pairs of keepX/keepY. Rather than doing it within each iteration, the function DetermineOptimalKeepVals() is called after all measure (cor, RSS) calculations. Impossible to iteratively build measure.pred using bplapply().

Old function names and structure was preserved to the best of my ability, though some of it sorely needed a face lift

Max-Bladen avatar May 16 '22 04:05 Max-Bladen

Thanks, @Max-Bladen. Great work on spotting and addressing this. I noticed that the checks for consistency of tune(method='spls') and tune.spls are dropped in unit tests. Was there a specific reason for that? Also, why was the RNG specifier removed in unit tests? Thanks

aljabadi avatar Jun 03 '22 08:06 aljabadi

Hi @aljabadi,

This is something I meant to ask you about but forgot. Due to my implementation of bplapply(), set.seed() is no longer affecting tune.spls(). Hence, calling the method twice on the same seed produced different results - the tune() and tune.spls() methods couldn't be equated. This is also why the tests currently just assess the class of the output and .mixo_rng() was removed. How can I make use of bplapply() without hindering the rng?

Max-Bladen avatar Jun 08 '22 23:06 Max-Bladen

Second set of commits on 13/12/2022 reflect initial set of commits, but replicated after the branch was rebased to master following PR #281.

Max-Bladen avatar Dec 13 '22 21:12 Max-Bladen