mixOmicsTeam / mixOmics

Development repository for the Bioconductor package 'mixOmics '
http://mixomics.org/
153 stars 51 forks source link

Inflated runtime on (s)PCA #250

Closed Max-Bladen closed 1 year ago

Max-Bladen commented 1 year ago

🐞 Describe the bug:

Due to the way in which the base::svd() function undergoes decomposition, an unnecessary (and excessive) amount of singular vector (left and right) and eigenvalues are returned from the function. These are then trimmed to include only the useful values, making these extra vectors pointless.


🤔 Expected behavior: By adjusting the svd() function, runtime and memory usage efficiency could be improved.


💡 Possible solution: Using the RSpectra package svds() function, the number of vectors and eigenvalues to calculate can be stipulated. By calculating only the necessary quantity, runtime and memory efficiency should be improved