... | @@ -20,6 +20,6 @@ In the above figures, the quantity 'pinv' refers to the `numpy.linalg.pinv` func |
... | @@ -20,6 +20,6 @@ In the above figures, the quantity 'pinv' refers to the `numpy.linalg.pinv` func |
|
Now, we discuss that the covariance matrix is ill-conditioned (i.e., nearly singular). Let us focus on the eignevalues of the covaraince matrix.
|
|
Now, we discuss that the covariance matrix is ill-conditioned (i.e., nearly singular). Let us focus on the eignevalues of the covaraince matrix.
|
|
<img src="uploads/b4604ec7877c560d6f7aa9232ffd4c08/eigenvalues1.png" width="440" >
|
|
<img src="uploads/b4604ec7877c560d6f7aa9232ffd4c08/eigenvalues1.png" width="440" >
|
|
|
|
|
|
The above plot shows the array of the eigenvalues. This plot indicates that the covariance matrix is ill-conditioned since several eigenvalues are close to zero. Also, the eigenvalues are oscillating around and after the index number 400 (the eigenvalues below ~1e-11), which occurs due to the numerical inaccuracies. This can affect the inverse calculation since the inverse is proportional to the determinant of that matrix. Therefore, we impose a threshold on eigenvalues to calculate the inverse in the pseudo-inverse method.
|
|
The above plot shows the array of the eigenvalues. This plot indicates that the covariance matrix is ill-conditioned since several eigenvalues are close to zero. Also, the eigenvalues are oscillating around and after the index number 400 (the eigenvalues below ~1e-11), which occurs due to the numerical inaccuracies. This can affect the inverse calculation since the inverse is proportional to the determinant of that matrix. Therefore, we impose a threshold on eigenvalues to calculate the inverse in the `pinv` method. In other words, a reduced singular matrix can be used in the SVD based inverse computation. The parameter `rcond` `numpy.linalg.pinv` function controls this criteria such that singular values less than or equal to `rcond * largest_singular_value` are set to zero.
|
|
|
|
|
|
|
|
|