... | @@ -3,12 +3,12 @@ We use the inverse of the covariance matrix to compute the weighted inner produc |
... | @@ -3,12 +3,12 @@ We use the inverse of the covariance matrix to compute the weighted inner produc |
|
```math
|
|
```math
|
|
\Sigma^{-1} \: \Sigma = \Sigma \: \Sigma^{-1} = I
|
|
\Sigma^{-1} \: \Sigma = \Sigma \: \Sigma^{-1} = I
|
|
```
|
|
```
|
|
Thus, the diagonal elements of the above inner product must be equal to 1 (or nearly equal to 1 for numerical computation) and off-diagonal elements must be zero (or nearly equal to zero). The inner product should be invariant for the choice of whether the right-hand inverse matrix or left-hand inverse matrix.
|
|
Thus, the diagonal elements of the above inner product must be equal to 1 (or nearly equal to 1 for numerical computation), and off-diagonal elements must be zero (or nearly equal to zero). The inner product should be invariant for the choice of whether the right-hand inverse matrix or left-hand inverse matrix.
|
|
|
|
|
|
So far, we were used the simple [`numpy.linalg.inv()`](https://numpy.org/doc/stable/reference/generated/numpy.linalg.inv.html) function to calculate the inverse of a matrix. In this case, we found disagreement between the right-hand inverse matrix or the left-hand inverse matrix.
|
|
So far, we were used the simple [`numpy.linalg.inv()`](https://numpy.org/doc/stable/reference/generated/numpy.linalg.inv.html) function to calculate the inverse of a matrix. In this case, we found disagreement between the right-hand inverse matrix or the left-hand inverse matrix, and also the off-diagonal elements are not nearly equal to zero.
|
|
|
|
|
|
<img src="uploads/5c14e15cf27db9dde43ae57c9da231e0/inv.png" width="440" ><img src="uploads/5f028dfe024ae56916586e2488a3c602/inv_off_diag.png" width="440" >
|
|
<img src="uploads/5c14e15cf27db9dde43ae57c9da231e0/inv.png" width="440" ><img src="uploads/5f028dfe024ae56916586e2488a3c602/inv_off_diag.png" width="440" >
|
|
|
|
|
|
In the above Figure, the quantity 'inv' refers to the `numpy.linalg.inv()` function.
|
|
In the above figures, the quantity 'inv' refers to the `numpy.linalg.inv()` function. The quantity 'k' refers to the index of the off-diagonal array; k>0 for diagonals above the main diagonal, and k<0 for diagonals below the main diagonal.
|
|
|
|
|
|
To resolve this issue, we propose to use the Moore-Penrose pseudo-inverse method. |
|
To resolve this issue, we propose to use the Moore-Penrose pseudo-inverse method. |
|
|
|
\ No newline at end of file |