Previous Lecture | lect08 | Next Lecture |
lect08, Tue 02/04
Data fitting by least squares with QR factorization
Reading assignment
For Thursday, read Section 2.9 (norms and condition numbers) of the NCM book.
References for today’s lecture
Sections 5.1 through 5.5 of the NCM book.
Outline
-
Manipulating sparse matrices in numpy/scipy
- Data fitting by least squares using QR factorization
- The factorization A = QR for non-square matrices A
- Least squares problems: Ax b
- a surveying problem
- Solving Ax b by QR factorization
- numpy/scipy routines:
- scipy.sparse.csr_matrix()
- spla.qr() [note: this is slightly different from npla.qr]
- npla.lstsq()