I require that the cholesky return an upper triangular matrix,

but did not explain this in the text.
This commit is contained in:
Roger Labbe 2016-03-26 10:09:51 -07:00
parent 8fa2cf615c
commit 69cf5aebce

View File

@ -20640,9 +20640,20 @@
"\\Sigma = \\mathbf{SS}^\\mathsf T\n",
"$$\n",
"\n",
"This definition is favored because $\\mathbf S$ is computed using the [*Cholesky decomposition*](https://en.wikipedia.org/wiki/Cholesky_decomposition) [3]. It decomposes a Hermitian, positive-definite matrix into a lower triangular matrix and its conjugate transpose. $\\mathbf P$ has these properties, so we can treat $\\mathbf S = \\text{cholesky}(\\mathbf P)$ as the square root of $\\mathbf P$.\n",
"This definition is favored because $\\mathbf S$ is computed using the [*Cholesky decomposition*](https://en.wikipedia.org/wiki/Cholesky_decomposition) [3]. It decomposes a Hermitian, positive-definite matrix into a triangular matrix and its conjugate transpose. The matrix can be either upper \n",
"or lower triangular, like so:\n",
"\n",
"SciPy provides `cholesky()` method in `scipy.linalg`. If your language of choice is Fortran, C, or C++, libraries such as LAPACK provide this routine. Matlab provides `chol()`."
"$$A=LL^ \\\\ A=U^U$$\n",
"\n",
"The asterick denotes the conjugate transpose; we have only real numbers so for us we can write:\n",
"\n",
"$$A=LL^\\mathsf T \\\\ A=U^\\mathsf T U$$\n",
"\n",
"$\\mathbf P$ has these properties, so we can treat $\\mathbf S = \\text{cholesky}(\\mathbf P)$ as the square root of $\\mathbf P$.\n",
"\n",
"SciPy provides `cholesky()` method in `scipy.linalg`. If your language of choice is Fortran, C, or C++, libraries such as LAPACK provide this routine. Matlab provides `chol()`.\n",
"\n",
"By default `scipy.linalg.cholesky()` returns a upper triangular matrix, so I elected to write the code to expect an upper triangular matrix. If you provide your own square root implementation you will need to take this into account."
]
},
{