ENH: add SVD update/insert
Author: lorentzenchrCreated Apr 12, 2022Updated Sep 18, 2026
Labelsenhancementscipy.linalgsustain-2026
Is your feature request related to a problem? Please describe.
Say you have a thin/ergonomic SVD for a matrix X = U @ S @ Vt and you do OLS/least squares.
Now you want to add a further feature/column to X or a further data row, then it would be very convenient to use the old SVD and just update it with the new column/row for X.
This is basically the same what's already possible with a QR decomposition by the great functionality of qr_update, qr_insertand qr_delete.
Describe the solution you'd like.
Add function svd_insert, svd_update and svd_delete to scipy.linalg.
A rank-1 update would be enough.
This can be done, e.g. with Givens rotations, basic formulae in
- Matthew Brand "Fast low-rank modifications of the thin singular value decomposition" Linear Algebra and its Applications 415 (2006) 20–30 https://www.asc.ohio-state.edu/statistics/dmsl//thinSVDtracking.pdf
- More literature links: https://stats.stackexchange.com/questions/177007/updating-svd-decomposition-after-adding-one-new-row-to-the-matrix
Describe alternatives you've considered.
No response
Additional context (e.g. screenshots, GIFs)
No response
Source: scipy/scipy