... | @@ -9,7 +9,7 @@ We use the inverse of the covariance matrix to compute the weighted inner produc |
... | @@ -9,7 +9,7 @@ We use the inverse of the covariance matrix to compute the weighted inner produc |
|
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.
|
|
|
|
|
|
# Simple numpy inverse
|
|
# Simple numpy inverse
|
|
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.
|
|
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" >
|
|
|
|
|
... | @@ -32,11 +32,11 @@ In the above figures, the quantity 'pinv' refers to the `numpy.linalg.pinv` func |
... | @@ -32,11 +32,11 @@ 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 eigenvalues of the covariance matrix.
|
|
Now, we discuss that the covariance matrix is ill-conditioned (i.e., nearly singular). Let us focus on the eigenvalues of the covariance 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 `pinv` method. In other words, a reduced singular matrix can be used in the SVD based inverse computation, which can capture the maximum feature of the covariance matrix and also excludes the numerical instabilities. The parameter `rcond` in `numpy.linalg.pinv` function controls this criterion such that singular values less than or equal to `rcond * largest_singular_value` are set to zero.
|
|
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 a rank of 400 (the eigenvalues below ~1e-11), which occurs due to the numerical inaccuracies. It 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, which can capture the maximum feature of the covariance matrix and also excludes the numerical instabilities. The parameter `rcond` in `numpy.linalg.pinv` function controls this criterion such that singular values less than or equal to `rcond * largest_singular_value` are set to zero.
|
|
|
|
|
|
# Choice of the rank of the covariance matrix
|
|
# Choice of the rank of the covariance matrix
|
|
## GW190814
|
|
## GW190814
|
|
First, we demonstrate an example from the GW190814 event to find an appropriate cut-off on the low-rank approximation of the covariance matrix, and its effect on $`\beta`$. We choose top 5 [PE samples](https://ldas-jobs.ligo.caltech.edu/~charlie.hoy/PE/O3/S190814bv/C01/SEOBNRv4HM/samples/SEOBNRv4HM_pesummary.dat) ( largest likelihood values ) and plot $`\beta`$ as a function of the rank of the covariance matrix.
|
|
First, we demonstrate an example from the GW190814 event to find an appropriate cut-off on the low-rank approximation of the covariance matrix, and its effect on $`\beta`$. We choose the top 5 [PE samples](https://ldas-jobs.ligo.caltech.edu/~charlie.hoy/PE/O3/S190814bv/C01/SEOBNRv4HM/samples/SEOBNRv4HM_pesummary.dat) ( largest likelihood values ) and plot $`\beta`$ as a function of the rank of the covariance matrix.
|
|
|
|
|
|
| m1 | m2 | s1z | s2z | logLikelihood | beta |
|
|
| m1 | m2 | s1z | s2z | logLikelihood | beta |
|
|
| ------- | ------- | -------- | ------- | -------------- | ------ |
|
|
| ------- | ------- | -------- | ------- | -------------- | ------ |
|
... | @@ -67,7 +67,7 @@ A similar plot for the GW190412 event (top 5 [PE samples](https://git.ligo.org/p |
... | @@ -67,7 +67,7 @@ A similar plot for the GW190412 event (top 5 [PE samples](https://git.ligo.org/p |
|
|
|
|
|
<img src="uploads/b70121bb673f3f1ba9966c123f598f90/beta_lambda_all.png" width="440" >
|
|
<img src="uploads/b70121bb673f3f1ba9966c123f598f90/beta_lambda_all.png" width="440" >
|
|
|
|
|
|
The effective-rank of the covariance matrix needs to be tuned for each event using a diagnostic plot such as those shown above.
|
|
The effective-rank of the covariance matrix needs to be tuned for each event using a diagnostic plot, which is shown above.
|
|
|
|
|
|
## $`\beta`$ for off-source samples versus rank
|
|
## $`\beta`$ for off-source samples versus rank
|
|
|
|
|
... | @@ -91,7 +91,7 @@ The above figures show the variation in $`\gamma`$ with respect to the rank of t |
... | @@ -91,7 +91,7 @@ The above figures show the variation in $`\gamma`$ with respect to the rank of t |
|
<img src="uploads/37318e5408bace5c9cc7473122233cbd/LLR22_lambda_onsource_gw190814.png" width="440" >
|
|
<img src="uploads/37318e5408bace5c9cc7473122233cbd/LLR22_lambda_onsource_gw190814.png" width="440" >
|
|
|
|
|
|
|
|
|
|
The figures show the variation of LLR22 versus the rank of the covariance matrix. These results produced using the 5 largest likelihood samples. The intrinsic parameter these samples are reported in the above tables.
|
|
The figures show the variation of LLR22 versus the rank of the covariance matrix. These results produced using the five largest likelihood samples. The intrinsic parameter these samples are reported in the above tables.
|
|
|
|
|
|
## Injection study
|
|
## Injection study
|
|
Here, we show the variation in $`\beta`$ due to the different choices of the rank of the covariance matrix for a set of identical injections. We produce the injected waveform using the parameters of the maximum likelihood sample.
|
|
Here, we show the variation in $`\beta`$ due to the different choices of the rank of the covariance matrix for a set of identical injections. We produce the injected waveform using the parameters of the maximum likelihood sample.
|
... | @@ -100,11 +100,11 @@ Here, we show the variation in $`\beta`$ due to the different choices of the ran |
... | @@ -100,11 +100,11 @@ Here, we show the variation in $`\beta`$ due to the different choices of the ran |
|
<img src="uploads/ea71de0d1e38b3518b6ffe925b81c0c5/inj_beta_rank_gw190412_1_.png" width="440" >
|
|
<img src="uploads/ea71de0d1e38b3518b6ffe925b81c0c5/inj_beta_rank_gw190412_1_.png" width="440" >
|
|
<img src="uploads/eaa22d5905eaf85dda3d5ce9f602f3fc/inj_beta_rank_gw190814.png" width="440" >
|
|
<img src="uploads/eaa22d5905eaf85dda3d5ce9f602f3fc/inj_beta_rank_gw190814.png" width="440" >
|
|
|
|
|
|
The black dashed trace shows the median, which increases rapidly for both the events for the first few basis vectors, and then it increases slowly. This feature is similar to the $`\gamma`$ versus rank plot. The $`\beta(\rm{Index})`$ in the region of less important basis vectors is increasing slowly but it also becomes oscillatory. This quantity for GW190814 is less oscillatory compare to the case of GW190412. It happens due to the fact that m=3 multipole in GW190814 is quite stronger than the Gw190412 event.
|
|
The black dashed trace shows the median, which increases rapidly for both the events for the first few basis vectors, and then it increases slowly. This feature is similar to the $`\gamma`$ versus rank plot. The $`\beta(\rm{Index})`$ in the region of less important basis vectors is increasing slowly, but it also becomes oscillatory. This quantity for GW190814 is less oscillatory compare to the case of GW190412. It happens because the m=3 multipole in GW190814 is quite stronger than the Gw190412 event.
|
|
|
|
|
|
|
|
|
|
## Various properties of the covariance matrix
|
|
## Various properties of the covariance matrix
|
|
For this demonstration, we use the 10 largest likelihood samples from PE run. We calculate the difference of norms of $`Sigma(k)\Sigma^{-1}(k)`$ and I(k), where $`Sigma(k)`$ is reduced covariance matrix with a rank of k and I(k) is the identity matrix with rank k. The norm is calculated using the Frobenius method.
|
|
For this demonstration, we use the ten largest likelihood samples from PE run. We calculate the difference of norms of $`Sigma(k)\Sigma^{-1}(k)`$ and I(k), where $`Sigma(k)`$ is reduced covariance matrix with a rank of k, and I(k) is the identity matrix with rank k. The norm is calculated using the Frobenius method.
|
|
|
|
|
|
### GW190412
|
|
### GW190412
|
|
|
|
|
... | @@ -124,5 +124,7 @@ For this demonstration, we use the 10 largest likelihood samples from PE run. We |
... | @@ -124,5 +124,7 @@ For this demonstration, we use the 10 largest likelihood samples from PE run. We |
|
<img src="uploads/8c8c56a9f9d6ac37a66b65c1aac126c5/trace_norm_gw190814.png" width="440" >
|
|
<img src="uploads/8c8c56a9f9d6ac37a66b65c1aac126c5/trace_norm_gw190814.png" width="440" >
|
|
|
|
|
|
|
|
|
|
The vertical dashed lines in the plots refer to a threshold of maximum rank for calculating the inverse covariance matrix using the pseudo-inverse method. We can see that the difference in norms starts to oscillate beyond this threshold. Note that the choice of maximum rank is done empirically by looking at the plots.
|
|
The vertical dashed lines in the plots refer to a threshold of maximum rank for calculating the inverse covariance matrix using the pseudo-inverse method. We can see that the difference in norms starts to oscillate beyond this threshold. Note that the choice of maximum rank is made empirically by looking at the plots.
|
|
|
|
The vertical lines of GW190412 and GW190814 events are drawn at k=370 and k=330, respectively.
|
|
|
|
|
|
|
|
|