mixOmics
mixOmics copied to clipboard
Extending `BPPARAM` usage to all `tune()` variants
After some initial exploration as part of rectifying problems noted in Issue #214, the inconsistency of the BiocParallel
usage across all the tune()
variants was noticed. In my exploration of this wider issue, I have come to the follow conclusions:
-
tune
- this is the wrapper function which can engage the usage of all below function, save for
tune.block.splsda
for some reason.tune()
still takescpus
. It handles the subsequent functions as such:-
tune.mint.splsda()
- not passed any parallelisation parameters due to the forced use of LOOCV. Hence, it cannot be parallelised. Nothing to change here- if called directly: totally fine due to LOOCV
-
tune.rcc()
- not passed any parallelisation parameters due to the lack of any implementation of parallelisation within this function. Oncetune.rcc()
can handle multiple CPU usage, this should be adjusted. Therefore, this will be left for now- if called directly: cannot use any parallelisation
-
tune.pca()
- not passed any parallelisation parameters due to this function not involving any repeated cross validation. It merely calculates the explained variance per component. Nothing to change here- if called directly: cannot use any parallelisation
-
tune.spca()
- not passed any parallelisation parameters despite the function havingBiocParallel
implementation. Need changes here- if called directly: must use
BPPARAM
and notcpus
- if called directly: must use
-
tune.splsda()
- passedcpus
directly from input. Need changes here- if called directly: uses
cpus
and has noBiocParallel
implementation. Uses its own methodology, involvingmakePSOCKcluster()
/makeForkCluster()
. Need to do more exploration here
- if called directly: uses
-
tune.spls()
- prior to function call,BPPARAM
object generated usingcpus
to controlworkers
count. This BiocParallel object is passed to the function Need changes here- if called directly: must use
BPPARAM
and notcpus
- if called directly: must use
-
tune.splslevel()
- not passed any parallelisation parameters due to a lack of parallelisation implementation. Probably not worth spending time on, but if so then need changes here*- if called directly: cannot use any parallelisation
-
- this is the wrapper function which can engage the usage of all below function, save for
-
tune.block.splsda
- this is not wrapped by
tune()
for some reason. It does takeBPPARAM
rather thancpus
and applies it properly
- this is not wrapped by
These conclusions were drawn from looking at the source code as well as running these function while observing any errors (eg unused argument (BPPARAM = param)
) AND runtime when using 1 vs 14 cores.
Note to self: when creating a new branch from this issue, fork it from branch issue-214
to carry over changes to tune.spls()
@Max-Bladen any updates, would love to use this feature