• incanter

# decomp-cholesky

## incanter.core

• (decomp-cholesky mat)
Returns the Cholesky decomposition of the given matrix. Equivalent to R's
chol function.

Returns:
a matrix of the triangular factor (note: the result from
cern.colt.matrix.linalg.DenseDoubleCholeskyDecomposition is transposed so
that it matches the result return from R's chol function.

Examples:

(use '(incanter core stats charts datasets))
(def iris (to-matrix (get-dataset :iris)))
;; take the Cholesky decompostion of the correlation matrix of the iris data.
(decomp-cholesky (correlation iris))

References:
http://incanter.org/docs/parallelcolt/api/cern/colt/matrix/tdouble/algo/decomposition/DoubleCholeskyDecomposition.html
http://en.wikipedia.org/wiki/Cholesky_decomposition

### Source incanter/core.clj:858 top

```(defn ^Matrix decomp-cholesky
" Returns the Cholesky decomposition of the given matrix. Equivalent to R's
chol function.

Returns:
a matrix of the triangular factor (note: the result from
cern.colt.matrix.linalg.DenseDoubleCholeskyDecomposition is transposed so
that it matches the result return from R's chol function.

Examples:

(use '(incanter core stats charts datasets))
(def iris (to-matrix (get-dataset :iris)))
;; take the Cholesky decompostion of the correlation matrix of the iris data.
(decomp-cholesky (correlation iris))

References:
http://incanter.org/docs/parallelcolt/api/cern/colt/matrix/tdouble/algo/decomposition/DoubleCholeskyDecomposition.html
http://en.wikipedia.org/wiki/Cholesky_decomposition
"
([^Matrix mat]
(Matrix. (.viewDice (.getL (DenseDoubleCholeskyDecomposition. mat))))))```
Vars in incanter.core/decomp-cholesky: defn
Used in 0 other vars