Skip to main content

Questions tagged [cholesky-decomposition]

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Simulate Gaussian copula with negative pair-wise correlations

I am now trying to simulate a multidimensional (let's say 4 dimensions) Gaussian copula. Given software restrictions, I can only use Excel for this simulation. That is why I am trying to implement the ...
S. Z.'s user avatar
  • 1
0 votes
0 answers
20 views

Constrained Cholesky Decomposition

Suppose that I have an $(n\times 1)$ vector of random variables, $\varepsilon$. However, I know that $k$ linear combinations of $\varepsilon$ are 0. Specifically, I know that for a $(k\times n)$ ...
Leland's user avatar
  • 1
0 votes
0 answers
38 views

Covariance inversion for Gaussian process

Background Let $x=f(u_x)\in\mathbb{R}$ and let $y=[f(u_y^1)\cdots f(u_y^{N})]\in\mathbb{R}^N$ for some function $f:u \in \mathbb{R}\mapsto \mathbb{R}$. Given $y$, $u_x$, $u_{y}^1,\dots, u_{y}^{N}$, I ...
matteogost's user avatar
6 votes
1 answer
202 views

Sampling with specified covariance matrix and distribution

Given a positive semi-definite $n\times n$ matrix $C$ I would like to construct $n$ random variables $X_1,\dots,X_n$ drawn from $n$ fixed distributions such that $\mathrm{corr}(X_i,X_j) = C_{ij}$. I ...
deepfloe's user avatar
  • 161
2 votes
1 answer
69 views

Passing a cholesky decomposition for a matrix with constrained variances to an objective function

I am trying to optimize an objective function $L(\theta)$ in which some parameters that I aim to recover belong to a covariance matrix, $\Sigma$. $\Sigma$ has a unique structure, which includes ones ...
EB727's user avatar
  • 33
4 votes
0 answers
143 views

Fast Cholesky decomposition of a Toepllitz matrix via embedding in a circulant & fft

As I understand it, the Cholesky decomposition of a Toeplitz matrix can be computed more efficiently by first embedding it in a circulant matrix then using FFT, but I'm having trouble finding any ...
Mike Lawrence's user avatar
0 votes
0 answers
55 views

Efficient way to encode a set of large covariance matrices

I have a computational model that involves having a set of $K$ covariance matrices, $\{\Sigma_1, ..., \Sigma_K\}$ with each $\Sigma_i \in R^{n \times n}$. Storing all these full covariance matrices is ...
dherrera's user avatar
  • 1,328
0 votes
0 answers
42 views

Distribution of positive semidefinite matrices that are generated by uniformly distributed positive definite matrices

Let $\mathcal{A}=\{ A_1,A_2,\dots,A_n \} \subseteq \mathcal{S}^p_{++}$ be a set of real positive-definite matrices sampled uniformly with a fixed trace (say, using this algorithm). To convert each $...
12345's user avatar
  • 213
2 votes
1 answer
345 views

How to sample efficiently from an inverse Wishart distribution?

I am trying to understand the code from pybasicbayes, which defines the following function to sample from an inverse Wishart: ...
seeker_after_truth's user avatar
1 vote
1 answer
68 views

Interpretation of impulse response analysis - Cholesky decomposition output in R

I am doing an impulse response analysis involving 3 time series A, B, and C in R. Following Lutkepohl approach, I used the log and diff functions to make them stationary. After creating the VAR model, ...
Thierry's user avatar
  • 11
1 vote
0 answers
29 views

General matrix decomposition downgrading algorithm for sampling

I would like to sample from a multivariate Gaussian distribution with covariance matrix $\Sigma - uu^T $, where $u$ is a vector and $\Sigma - uu^T $ is PSD. I have knowledge of a non-Cholesky ...
Noam Elata's user avatar
2 votes
1 answer
168 views

Spectral decomposition and quadratic forms

Let $\mathbf{x}\sim N(0,I)$ and $A$ a real-valued square matrix. The spectral decomposition allows us to rewrite a quadratic form $\mathbf{x}^\top A \mathbf{x}$ as a sum of iid chi-squared random ...
BelwarDissengulp's user avatar
6 votes
1 answer
929 views

Statistical interpretation of diagonal of Cholesky decomposition?

Given a set of $m$ examples $x$ arranged as rows in $m\times n$ data matrix X, consider Cholesky decomposition of covariance matrix $X'X$. Is there a statistical interpretation of diagonal entries of ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
90 views

Effect of using Cholesky transpose

I am generating random normal samples Y with covariance C using a well known procedure: Let L be the Cholesky decomposition of C, such that $C = LL^T$. Now given a matrix of random numbers $X, x_{ij}...
feetwet's user avatar
  • 1,162
1 vote
0 answers
238 views

How is Cholesky decomposition used in ridge regression?

As far as I learnt, Cholesky decomposition can be used only for symmetrical positive definite matrices, but I can see it is used as solver in Sklearn-Ridge package, can somebody explain how it is used ...
Harvey's user avatar
  • 11
2 votes
0 answers
62 views

What is the distribution of a Cholesky transformed variable?

I have a situation where I have a vector $\textbf{x} \sim N(\mu_x, \sigma^2_x)$ and a vector $\textbf{y} \sim N(\mu_y, \sigma^2_y)$. I want to generate a new $\textbf{y}_2$ that transforms $\textbf{y}$...
asd's user avatar
  • 219
1 vote
0 answers
815 views

Positive semi definite matrix with negative eigenvalues?

From what I know, for any square real matrix A, a matrix generated with the following should be a positive semidefinite (PSD) matrix: ...
JAEWON LEE's user avatar
1 vote
0 answers
114 views

When should we decompose the precision matrix as opposed to the covariance matrix to generate correlated variables?

We can take a covariance matrix $\Sigma$ and decompose this into a lower and upper triangular matrix $\Sigma = U^T U$ where $U$ is the Cholesky matrix. This matrix can be used to transform ...
Chris C's user avatar
  • 2,630
2 votes
1 answer
134 views

Can any covariance factorization $LL^\top$ be used for sampling?

I thought that any factorization of the for $LL^\top$ of a covariance matrix could be used for correlating random noise according to the covariance. I tried doing this with the following code and ...
Joff's user avatar
  • 942
2 votes
1 answer
138 views

Using kernlab::kqr(reduced = TRUE), how is the y argument missing in the call to csi()?

I'm trying to perform a kernelized quantile regression on some data using the function kqr() from the kernlab package in R. The ...
Adam's user avatar
  • 23
6 votes
1 answer
220 views

What is the expectation of the Cholesky factor of a Wishart distributed random matrix?

Let a $d-\text{dimensional}$ Wishart random variable with $\nu$ degrees of freedom $\Sigma$ be distributed according to $\mathcal{W}(\Sigma|\Sigma_0, \nu) \propto |\Sigma|^\frac{\nu-d-1}2\exp{(-\...
user27886's user avatar
  • 615
1 vote
0 answers
214 views

A new method for processing music scores?

I have developed a method and python script: https://github.com/githubuser1983/algorithmic_python_music which allows the user to input a midi file and then chose a few numbers as parameters, and the ...
mathoverflowUser's user avatar
3 votes
2 answers
477 views

How do I generate $n$ random variables that follow a correlation matrix with individually log normal distributions?

Short and sweet: I'd like to model $n$ random variables representing price changes of individual assets. Each of these should be distributed as a log normal variable with a median of 1. Is there a way ...
Peteris's user avatar
  • 210
2 votes
0 answers
431 views

Does the Cholesky decomposition of a covariance matrix lead to a lower triangular matrix with positive diagonals?

We know that an $N\times N$ covariance matrix $\Sigma$ is symmetric positive definite, and can be factorized using Cholesky decomposition as follows \begin{equation} \Sigma=LL' \end{equation} where $L$...
Carl's user avatar
  • 1,226
0 votes
0 answers
69 views

Drawing samples from matrix normal

I have to generate $n \times m$ sample ($A$) from a matrix normal distribution, given two covariance matrices: $n \times n$ row covariance matrix (matrix $B$) (defines the covariance between the rows ...
borodor's user avatar
  • 51
6 votes
1 answer
1k views

Cholesky decomposition lower triangular in Gaussian process sampling

I am trying to intuitively understand the Cholesky decomposition in gaussian process function sampling. I understand it as as the square root of the covariance matrix being the multivariate ...
Joff's user avatar
  • 942
1 vote
0 answers
263 views

Proof that variance-covariance matrix of var(b|X) - var(b*|X) is positive-semidefinite [closed]

I'm having trouble finding the proof to show that the variance-covariance matrix of var (b|X) - var (b*|X) is positive-semidefinite. OLS estimator = GLS estimator = Hint: Note that A is the Cholesky ...
Chalaw's user avatar
  • 11
20 votes
1 answer
7k views

Relationship between Cholesky decomposition and matrix inversion?

I've been reviewing Gaussian Processes and, from what I can tell, there's some debate whether the "covariance matrix" (returned by the kernel), which needs to be inverted, should be done so ...
jbuddy_13's user avatar
  • 3,404
3 votes
0 answers
415 views

Efficient computation of marginalized multivariate normal posterior distribution

In general,if we know that the marginal Gaussian distribution for some variable $\textbf{x}$ and a conditional Gaussian distribution for some $\textbf{y}|\textbf{x}$ of the forms: $$p(\textbf{x}) = \...
nwknoblauch's user avatar
4 votes
1 answer
1k views

Moore Penrose Pseudo-Inverse Fast Algorithm in R [closed]

I want to apply Moore Penrose Pseudo-Inverse on my matrix, which is a 20,000 * 20,000 symmetric matrix with rank 19,999. I found ginv() function from the ...
Jeffrey's user avatar
  • 107
1 vote
0 answers
96 views

What is the EVD operation that replaces Cholesky decomposition in lme4qtl R package?

I am working with pedigreemm and lme4qtl R packages. If I understand it correctly, both are extensions of the lme4 package, which doesn't allow for correlation between random effect clusters, and so ...
Anna_H's user avatar
  • 21
1 vote
1 answer
594 views

Discrepancy in Cholesky decomposition matrix from variance covariance matrix obtained in Stata and R using regression

This is a question to someone who knows both R and Stata. For a simple linear regression model, I was trying to estimate the Cholesky decomposition matrix from the variance-covariance matrix of the ...
Sheeja Krishnan's user avatar
1 vote
1 answer
943 views

Cholesky decomposition or alternative for negatively correlated data simulations

I want to generate some signals that have a correlation distribution around a specific pre-defined correlation value (i.e., the distribution of the values of their correlation matrix is around a ...
seralouk's user avatar
  • 120
4 votes
0 answers
551 views

Geometric interpretation of Cholesky Decomposition

I understand that a square matrix, say $A$, can be thought of as a linear transformation within the same space. I could be as simple as basis change or some other transformation. In this way of ...
Dayne's user avatar
  • 2,661
1 vote
1 answer
76 views

How to show that $X = LY$ where $Y\sim N(0,I)$?

Let $X\sim MVN(0,\Sigma)$ denote a random vector having the multivariate normal distribution with mean $0$ and covariance matrix $\Sigma$. Suppose we want to sample from $X\sim MVN(0,\Sigma)$. ...
Idonknow's user avatar
  • 341
1 vote
0 answers
85 views

Difference between sparse cholesky and cholesky decomposition

I am confused as to the difference between the regular cholesky decomposition and the sparse cholesky decomposition (i.e. that which is performed by LAPACK's CHOLMOD...
JDoe2's user avatar
  • 680
1 vote
0 answers
62 views

Showing a useful result for Wisharts and Multivariate Beta random matrices

Let $\mathbf{A} \sim \text{Wishart}_m\left(k_a,\mathbf{V} \right)$ and $\mathbf{B} \sim \text{Wishart}_m\left(k_b,\mathbf{V} \right)$ be two full rank Wishart random matrices. Define $$ \mathbf{S} = \...
Taylor's user avatar
  • 21.2k
0 votes
0 answers
136 views

How to Incorporate Skew Into Simulated Data?

Suppose I have a dataset $\mathbf{X}$ which is a $n \times m$ matrix of $n$ independent realizations of some $m$-dimensional random vector $\mathbf{x}$. I want to generate a new dataset $\mathbf{X}'$ ...
olooney's user avatar
  • 3,315
0 votes
0 answers
328 views

Betareg error when running bootstrap-like simulations (Error in chol.default(K) : the leading minor of order 16 is not positive definite

A previous post discussed a similar case on non-positive definite covariance matrices resulting when producing half-normal residual plots using the package betareg. However, I would like additional ...
Francisco J. Guerrero's user avatar
0 votes
0 answers
133 views

Getting sets of random correlated variables

For the training of a machine learning model I need to add additional features, and these features are correlated. I need to run the model N times adding these features with random values, and for ...
ps0604's user avatar
  • 25
0 votes
0 answers
948 views

Add Noise to a Dataset

I've generated a dataset of 100 elements from a 3-variate Gaussian distribution with parameters $\mu = 0$ and $\Sigma = \begin{pmatrix}1 & \rho_1 & \rho_2 \\ \rho_1 & 1 & \rho_1 \\ \...
JackLametta's user avatar
2 votes
0 answers
523 views

Eigenvalue decomposition of a covariance matrix using a fast Cholesky decomposition

Let $\mathbf{C}$ be a $n \times n$ covariance matrix and assume that the LDL' Cholesky decomposition can be obtained efficiently. Can we take advantage of this to obtain a fast eigenvalue ...
Yves's user avatar
  • 5,676
1 vote
0 answers
125 views

Cholesky decomposition in control variates method (Monte Carlo variance reduction technique)

The control variates method, used as a variance reduction technique for Monte Carlo simulations, takes one new variable $t$, correlated to the random variable $m$ to estimate (using the same notations ...
Sithered's user avatar
  • 111
0 votes
1 answer
51 views

Conserve correlation with simulate data

let me explain you the process, I have random variables in a matrix $X_1$: $260\times3$. I have my correlation matrix $\rho_1$: $3\times3$ from my matrix $X_1$. Now I use a Cholesky decomposition ...
Pierre Siegelbaum's user avatar
3 votes
1 answer
2k views

Why is computing ridge regression with a Cholesky decomposition much quicker than using SVD?

By my understanding, for a matrix with n samples and p features: Ridge regression using Cholesky decomposition takes O(p^3) time Ridge regression using SVD takes O(p^3) time Computing SVD when only ...
pighead10's user avatar
  • 105
3 votes
0 answers
210 views

Cholesky Decomposition (in lmer from lme4)

When I retrace the implementation of lmer from lme4 I faced a question regarding cholesky decomposition used for solving penalized least squares. Consider a Cholesky decomposition of a matrix M with ...
Toby's user avatar
  • 416
0 votes
0 answers
1k views

Generalized linear regression with custom variance-covariance matrix in R

I want to compute the estimate of $\beta$ for a linear model $Y = X\beta + \varepsilon $ with $$\varepsilon \sim N_d(0, \sigma^2V),$$ where $V$ is a $d\times d$ definitive posive, symmetric matrix. ...
Nisba's user avatar
  • 131
7 votes
1 answer
3k views

Difference between Cholesky decomposition and log-cholesky Decomposition

Is there any difference between a Cholesky decomposition and a log-cholesky decomposition? If yes, what is the difference? In the paper "An R package for dynamic linear models" by Giovanni Petris ( ...
Ferdi's user avatar
  • 5,197
3 votes
3 answers
2k views

Estimating correlation matrix using numeric likelihood maximization

I'm performing maximum likelihood estimation on jointly distributed data and I'm having some issues estimating the correlation terms. I am using an approach based on the Cholesky decomposition, but I ...
Felipe D.'s user avatar
  • 268
0 votes
0 answers
3k views

Cholesky decomposition of the covariance matrix: not positive definite?

I am implementing a multivariate simulation in R and when applying the Cholesky decomposition to the covariance matrix I get: the leading minor of order one is not positive definite How could the ...
user211369's user avatar