1.2.3-SNAPSHOT Arrow_down_16x16

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))
;; load the iris dataset
(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

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 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))
  ;; load the iris dataset
  (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

Comments top

No comments for decomp-cholesky. Log in to add a comment.