... | @@ -15,4 +15,9 @@ To resolve this issue, we propose to use the Moore-Penrose pseudo-inverse method |
... | @@ -15,4 +15,9 @@ To resolve this issue, we propose to use the Moore-Penrose pseudo-inverse method |
|
`numpy.linalg.inv()` function.
|
|
`numpy.linalg.inv()` function.
|
|
|
|
|
|
<img src="uploads/4692d03ff868fcc538ab06803102a7c3/pinv.png" width="440" ><img src="uploads/8d64ddc718f1fe06d54b62ca6028d123/pinv_off_diag.png" width="440" >
|
|
<img src="uploads/4692d03ff868fcc538ab06803102a7c3/pinv.png" width="440" ><img src="uploads/8d64ddc718f1fe06d54b62ca6028d123/pinv_off_diag.png" width="440" >
|
|
In the above figures, the quantity 'pinv' refers to the `numpy.linalg.pinv` function. The figures indicate that the inner product using the right-hand inverse matrix is consistent with the left-hand inverse matrix, and also the off-diagonal elements are nearly equal to zero. Therefore, `pinv` more robust. However, the question is that why `pinv` is working better than the simple `inv` function. |
|
In the above figures, the quantity 'pinv' refers to the `numpy.linalg.pinv` function. The figures indicate that the inner product using the right-hand inverse matrix is consistent with the left-hand inverse matrix, and also the off-diagonal elements are nearly equal to zero. Therefore, `pinv` more robust.
|
|
|
|
|
|
|
|
Now, we discuss that the covariance matrix is ill-conditioned (i.e. almost singular).
|
|
|
|
<img src="uploads/b4604ec7877c560d6f7aa9232ffd4c08/eigenvalues1.png" width="440" >
|
|
|
|
|
|
|
|
However, the question is that why `pinv` is working better than the simple `inv` function. |