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
🐞 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
packagesvds()
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