Woodbury Matrix Inversion
$begingroup$
I am trying to invert a matrix using Woodbury identity. The inversion using Cholesky decomposition has the following pseudo-code:
For $t=1,2,...$
$(1);; text{Read};x_tinmathbb{R}^n$
$(2);;D_{t-1}=diag(|theta_t^1|,...,|theta_t^n|)$
$(3);;A_t=A_t+x_tx_t'$
$(4);;A_{t}^{-1}=sqrt{D_{{t-1}}}left(amathbf{I}+sqrt{D_{{t-1}}}A_tsqrt{D_{{t-1}}}right)^{-1}sqrt{D_{{t-1}}}$
$(5);;text{Read};y_tinmathbb{R}$
$(6);;b=b+y_tx_t$
$(7);;theta_t=A_{t}^{-1}b$
End For
The well known application of Sherman-Morrison on Recursive Least Squares is as follows:
$$A_t^{-1}=(aI+x_tx_t')^{-1}=A_{t-1}^{-1} - frac{(A_{t-1}^{-1}x_t)(A_{t-1}^{-1}x_t)'}{1+x_t'A_{t-1}^{-1}x_t}$$
where $A_0^{-1}=frac{1}{a}I$ and we can set $A_t = A_{t-1}+sum_{t=1}^Tx_tx_t'$, which will lead to time complexity of $O(n^2)$.
The above technique is mentioned here. The two implementation in $texttt{R}$ are as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
Cholsky<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
aI<- diag(a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- aI + (xt %*% t(xt))
InvA<-chol2inv(chol(At))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Cholsky(X,Y,a)
Morrison<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
At<-diag(1/a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- At + (xt %*% t(xt))
InvA <- At - ((t(xt%*%At)%*%(as.matrix(xt%*%At)))
/as.numeric(xt%*%At%*%xt+1))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Morrison(X,Y,a)
They don't give the same result. So, perhaps I should not expect the implementations to be equivalent.
I was wondering if I could invert the following (for the above case) more efficiently:
$$A_t^{-1}=left(D_{t-1}^{frac{1}{2}}A_tD_{t-1}^{frac{1}{2}}+aIright)^{-1}$$
where $A_t=A_{t-1}+x_tx_t'$ and $A_0=mathbf{0}$.
Essentially, I want to invert:
$$M_t=left(amathbf{I}+sqrt{D_{{t-1}}}x_tx_t'sqrt{D_{{t-1}}}right)$$
I say:
$$M_{t}^{-1}=M_{t-1}^{-1}-frac{(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)'}{1+x_t'D_{t-1}^{frac{1}{2}}M_{t-1}D_{t-1}^{frac{1}{2}}x_t}$$
where $D_0=diag(mathbf{1}$). So, $M^{-1}_0=frac{1}{a}I$
RLS identity given above $(aI+u_tv_t)^{-1}$ uses $u=A_{t-1}^{-1}x_t,v_t=u_t'$,
I am using $u=M_{t-1}^{-1}D_{t-1}^{frac{1}{2}}x_t,v_t=u_t'$
One may write the implementations in $texttt{R}$ as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
#Cholesky implementation
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
bt<- matrix(0,ncol=1,nrow=N)
At<- diag(0,N)
I<- diag(a,N);Mt<-diag(1/a,N)
theta0<- rep(1,N)
for (t in 1:2){
xt<-X[t,]
Dt <- diag(sqrt(abs(as.numeric(theta0))))
At <- At + (xt %*% t(xt))
Mt <- I + (Dt%*%At%*%Dt)
InvA <- chol2inv(chol( Mt ))
AAt<- Dt %*%InvA%*% Dt
bt <- bt + (Y[t] * xt)
theta0 <- AAt %*% bt
print(theta0)
}
Above is the correct implementation of the pseudo code. If I swap the following lines. I don't get the same answer.
Mt <- Mt + (Dt%*%At%*%Dt)
InvA<- Mt - ((t(xt%*%Dt%*%Mt)%*%(as.matrix(xt%*%Dt%*%Mt)))
/as.numeric(xt%*%Dt%*%Mt%*%t(as.matrix(xt%*%Dt))+1))
Why is that?
linear-algebra matrices inverse numerical-linear-algebra
$endgroup$
|
show 5 more comments
$begingroup$
I am trying to invert a matrix using Woodbury identity. The inversion using Cholesky decomposition has the following pseudo-code:
For $t=1,2,...$
$(1);; text{Read};x_tinmathbb{R}^n$
$(2);;D_{t-1}=diag(|theta_t^1|,...,|theta_t^n|)$
$(3);;A_t=A_t+x_tx_t'$
$(4);;A_{t}^{-1}=sqrt{D_{{t-1}}}left(amathbf{I}+sqrt{D_{{t-1}}}A_tsqrt{D_{{t-1}}}right)^{-1}sqrt{D_{{t-1}}}$
$(5);;text{Read};y_tinmathbb{R}$
$(6);;b=b+y_tx_t$
$(7);;theta_t=A_{t}^{-1}b$
End For
The well known application of Sherman-Morrison on Recursive Least Squares is as follows:
$$A_t^{-1}=(aI+x_tx_t')^{-1}=A_{t-1}^{-1} - frac{(A_{t-1}^{-1}x_t)(A_{t-1}^{-1}x_t)'}{1+x_t'A_{t-1}^{-1}x_t}$$
where $A_0^{-1}=frac{1}{a}I$ and we can set $A_t = A_{t-1}+sum_{t=1}^Tx_tx_t'$, which will lead to time complexity of $O(n^2)$.
The above technique is mentioned here. The two implementation in $texttt{R}$ are as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
Cholsky<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
aI<- diag(a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- aI + (xt %*% t(xt))
InvA<-chol2inv(chol(At))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Cholsky(X,Y,a)
Morrison<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
At<-diag(1/a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- At + (xt %*% t(xt))
InvA <- At - ((t(xt%*%At)%*%(as.matrix(xt%*%At)))
/as.numeric(xt%*%At%*%xt+1))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Morrison(X,Y,a)
They don't give the same result. So, perhaps I should not expect the implementations to be equivalent.
I was wondering if I could invert the following (for the above case) more efficiently:
$$A_t^{-1}=left(D_{t-1}^{frac{1}{2}}A_tD_{t-1}^{frac{1}{2}}+aIright)^{-1}$$
where $A_t=A_{t-1}+x_tx_t'$ and $A_0=mathbf{0}$.
Essentially, I want to invert:
$$M_t=left(amathbf{I}+sqrt{D_{{t-1}}}x_tx_t'sqrt{D_{{t-1}}}right)$$
I say:
$$M_{t}^{-1}=M_{t-1}^{-1}-frac{(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)'}{1+x_t'D_{t-1}^{frac{1}{2}}M_{t-1}D_{t-1}^{frac{1}{2}}x_t}$$
where $D_0=diag(mathbf{1}$). So, $M^{-1}_0=frac{1}{a}I$
RLS identity given above $(aI+u_tv_t)^{-1}$ uses $u=A_{t-1}^{-1}x_t,v_t=u_t'$,
I am using $u=M_{t-1}^{-1}D_{t-1}^{frac{1}{2}}x_t,v_t=u_t'$
One may write the implementations in $texttt{R}$ as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
#Cholesky implementation
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
bt<- matrix(0,ncol=1,nrow=N)
At<- diag(0,N)
I<- diag(a,N);Mt<-diag(1/a,N)
theta0<- rep(1,N)
for (t in 1:2){
xt<-X[t,]
Dt <- diag(sqrt(abs(as.numeric(theta0))))
At <- At + (xt %*% t(xt))
Mt <- I + (Dt%*%At%*%Dt)
InvA <- chol2inv(chol( Mt ))
AAt<- Dt %*%InvA%*% Dt
bt <- bt + (Y[t] * xt)
theta0 <- AAt %*% bt
print(theta0)
}
Above is the correct implementation of the pseudo code. If I swap the following lines. I don't get the same answer.
Mt <- Mt + (Dt%*%At%*%Dt)
InvA<- Mt - ((t(xt%*%Dt%*%Mt)%*%(as.matrix(xt%*%Dt%*%Mt)))
/as.numeric(xt%*%Dt%*%Mt%*%t(as.matrix(xt%*%Dt))+1))
Why is that?
linear-algebra matrices inverse numerical-linear-algebra
$endgroup$
$begingroup$
so you want the inverse of the sum of two full rank matrices and expect Sherman Morrison to do it more efficiently?
$endgroup$
– LinAlg
Dec 26 '18 at 23:43
$begingroup$
how large is $T$?
$endgroup$
– LinAlg
Dec 26 '18 at 23:53
$begingroup$
We sequentially process $x_t,y_t$ and update $A_t$ at each itteration. $T=1,2,...$. In the above example $T=20$.
$endgroup$
– Waqas
Dec 26 '18 at 23:55
1
$begingroup$
Use this generalization with $U=V^T=sum_t D^{0.5}_{t-1}x_t$. I allows you to update the inverse of $aI$ by inverting a 20x20 matrix.
$endgroup$
– LinAlg
Dec 27 '18 at 0:02
$begingroup$
The thing is I don't know $T$ in advance. At each trial $t=1,2,...$ I need to invert $Ntimes N$ matrix. Where $N$ denotes the number of columns. I need to do it iteratively. Also, at each trial $x_tx_t'$ (covariance matrix) is not positive definite, rather semi-positive definite.
$endgroup$
– Waqas
Dec 27 '18 at 0:05
|
show 5 more comments
$begingroup$
I am trying to invert a matrix using Woodbury identity. The inversion using Cholesky decomposition has the following pseudo-code:
For $t=1,2,...$
$(1);; text{Read};x_tinmathbb{R}^n$
$(2);;D_{t-1}=diag(|theta_t^1|,...,|theta_t^n|)$
$(3);;A_t=A_t+x_tx_t'$
$(4);;A_{t}^{-1}=sqrt{D_{{t-1}}}left(amathbf{I}+sqrt{D_{{t-1}}}A_tsqrt{D_{{t-1}}}right)^{-1}sqrt{D_{{t-1}}}$
$(5);;text{Read};y_tinmathbb{R}$
$(6);;b=b+y_tx_t$
$(7);;theta_t=A_{t}^{-1}b$
End For
The well known application of Sherman-Morrison on Recursive Least Squares is as follows:
$$A_t^{-1}=(aI+x_tx_t')^{-1}=A_{t-1}^{-1} - frac{(A_{t-1}^{-1}x_t)(A_{t-1}^{-1}x_t)'}{1+x_t'A_{t-1}^{-1}x_t}$$
where $A_0^{-1}=frac{1}{a}I$ and we can set $A_t = A_{t-1}+sum_{t=1}^Tx_tx_t'$, which will lead to time complexity of $O(n^2)$.
The above technique is mentioned here. The two implementation in $texttt{R}$ are as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
Cholsky<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
aI<- diag(a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- aI + (xt %*% t(xt))
InvA<-chol2inv(chol(At))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Cholsky(X,Y,a)
Morrison<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
At<-diag(1/a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- At + (xt %*% t(xt))
InvA <- At - ((t(xt%*%At)%*%(as.matrix(xt%*%At)))
/as.numeric(xt%*%At%*%xt+1))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Morrison(X,Y,a)
They don't give the same result. So, perhaps I should not expect the implementations to be equivalent.
I was wondering if I could invert the following (for the above case) more efficiently:
$$A_t^{-1}=left(D_{t-1}^{frac{1}{2}}A_tD_{t-1}^{frac{1}{2}}+aIright)^{-1}$$
where $A_t=A_{t-1}+x_tx_t'$ and $A_0=mathbf{0}$.
Essentially, I want to invert:
$$M_t=left(amathbf{I}+sqrt{D_{{t-1}}}x_tx_t'sqrt{D_{{t-1}}}right)$$
I say:
$$M_{t}^{-1}=M_{t-1}^{-1}-frac{(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)'}{1+x_t'D_{t-1}^{frac{1}{2}}M_{t-1}D_{t-1}^{frac{1}{2}}x_t}$$
where $D_0=diag(mathbf{1}$). So, $M^{-1}_0=frac{1}{a}I$
RLS identity given above $(aI+u_tv_t)^{-1}$ uses $u=A_{t-1}^{-1}x_t,v_t=u_t'$,
I am using $u=M_{t-1}^{-1}D_{t-1}^{frac{1}{2}}x_t,v_t=u_t'$
One may write the implementations in $texttt{R}$ as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
#Cholesky implementation
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
bt<- matrix(0,ncol=1,nrow=N)
At<- diag(0,N)
I<- diag(a,N);Mt<-diag(1/a,N)
theta0<- rep(1,N)
for (t in 1:2){
xt<-X[t,]
Dt <- diag(sqrt(abs(as.numeric(theta0))))
At <- At + (xt %*% t(xt))
Mt <- I + (Dt%*%At%*%Dt)
InvA <- chol2inv(chol( Mt ))
AAt<- Dt %*%InvA%*% Dt
bt <- bt + (Y[t] * xt)
theta0 <- AAt %*% bt
print(theta0)
}
Above is the correct implementation of the pseudo code. If I swap the following lines. I don't get the same answer.
Mt <- Mt + (Dt%*%At%*%Dt)
InvA<- Mt - ((t(xt%*%Dt%*%Mt)%*%(as.matrix(xt%*%Dt%*%Mt)))
/as.numeric(xt%*%Dt%*%Mt%*%t(as.matrix(xt%*%Dt))+1))
Why is that?
linear-algebra matrices inverse numerical-linear-algebra
$endgroup$
I am trying to invert a matrix using Woodbury identity. The inversion using Cholesky decomposition has the following pseudo-code:
For $t=1,2,...$
$(1);; text{Read};x_tinmathbb{R}^n$
$(2);;D_{t-1}=diag(|theta_t^1|,...,|theta_t^n|)$
$(3);;A_t=A_t+x_tx_t'$
$(4);;A_{t}^{-1}=sqrt{D_{{t-1}}}left(amathbf{I}+sqrt{D_{{t-1}}}A_tsqrt{D_{{t-1}}}right)^{-1}sqrt{D_{{t-1}}}$
$(5);;text{Read};y_tinmathbb{R}$
$(6);;b=b+y_tx_t$
$(7);;theta_t=A_{t}^{-1}b$
End For
The well known application of Sherman-Morrison on Recursive Least Squares is as follows:
$$A_t^{-1}=(aI+x_tx_t')^{-1}=A_{t-1}^{-1} - frac{(A_{t-1}^{-1}x_t)(A_{t-1}^{-1}x_t)'}{1+x_t'A_{t-1}^{-1}x_t}$$
where $A_0^{-1}=frac{1}{a}I$ and we can set $A_t = A_{t-1}+sum_{t=1}^Tx_tx_t'$, which will lead to time complexity of $O(n^2)$.
The above technique is mentioned here. The two implementation in $texttt{R}$ are as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
Cholsky<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
aI<- diag(a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- aI + (xt %*% t(xt))
InvA<-chol2inv(chol(At))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Cholsky(X,Y,a)
Morrison<-function(X,Y,a){
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
At<-diag(1/a,N)
bt<- matrix(0,ncol=1,nrow=N)
for (t in 1:T){
xt<-X[t,]
At <- At + (xt %*% t(xt))
InvA <- At - ((t(xt%*%At)%*%(as.matrix(xt%*%At)))
/as.numeric(xt%*%At%*%xt+1))
bt <- bt + (Y[t] * xt)
theta<- InvA %*% bt
}
return(theta)
}
Morrison(X,Y,a)
They don't give the same result. So, perhaps I should not expect the implementations to be equivalent.
I was wondering if I could invert the following (for the above case) more efficiently:
$$A_t^{-1}=left(D_{t-1}^{frac{1}{2}}A_tD_{t-1}^{frac{1}{2}}+aIright)^{-1}$$
where $A_t=A_{t-1}+x_tx_t'$ and $A_0=mathbf{0}$.
Essentially, I want to invert:
$$M_t=left(amathbf{I}+sqrt{D_{{t-1}}}x_tx_t'sqrt{D_{{t-1}}}right)$$
I say:
$$M_{t}^{-1}=M_{t-1}^{-1}-frac{(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)(M_{t-1}D_{t-1}^{frac{1}{2}}x_t)'}{1+x_t'D_{t-1}^{frac{1}{2}}M_{t-1}D_{t-1}^{frac{1}{2}}x_t}$$
where $D_0=diag(mathbf{1}$). So, $M^{-1}_0=frac{1}{a}I$
RLS identity given above $(aI+u_tv_t)^{-1}$ uses $u=A_{t-1}^{-1}x_t,v_t=u_t'$,
I am using $u=M_{t-1}^{-1}D_{t-1}^{frac{1}{2}}x_t,v_t=u_t'$
One may write the implementations in $texttt{R}$ as follows:
X <-matrix(runif(1000),20,10)
Y<-rnorm(20)
a<- 0.1
#Cholesky implementation
X <- as.matrix(X)
Y <- as.matrix(Y)
T <- nrow(X)
N <- ncol(X)
bt<- matrix(0,ncol=1,nrow=N)
At<- diag(0,N)
I<- diag(a,N);Mt<-diag(1/a,N)
theta0<- rep(1,N)
for (t in 1:2){
xt<-X[t,]
Dt <- diag(sqrt(abs(as.numeric(theta0))))
At <- At + (xt %*% t(xt))
Mt <- I + (Dt%*%At%*%Dt)
InvA <- chol2inv(chol( Mt ))
AAt<- Dt %*%InvA%*% Dt
bt <- bt + (Y[t] * xt)
theta0 <- AAt %*% bt
print(theta0)
}
Above is the correct implementation of the pseudo code. If I swap the following lines. I don't get the same answer.
Mt <- Mt + (Dt%*%At%*%Dt)
InvA<- Mt - ((t(xt%*%Dt%*%Mt)%*%(as.matrix(xt%*%Dt%*%Mt)))
/as.numeric(xt%*%Dt%*%Mt%*%t(as.matrix(xt%*%Dt))+1))
Why is that?
linear-algebra matrices inverse numerical-linear-algebra
linear-algebra matrices inverse numerical-linear-algebra
edited Dec 28 '18 at 15:11
Waqas
asked Dec 25 '18 at 9:37
WaqasWaqas
15913
15913
$begingroup$
so you want the inverse of the sum of two full rank matrices and expect Sherman Morrison to do it more efficiently?
$endgroup$
– LinAlg
Dec 26 '18 at 23:43
$begingroup$
how large is $T$?
$endgroup$
– LinAlg
Dec 26 '18 at 23:53
$begingroup$
We sequentially process $x_t,y_t$ and update $A_t$ at each itteration. $T=1,2,...$. In the above example $T=20$.
$endgroup$
– Waqas
Dec 26 '18 at 23:55
1
$begingroup$
Use this generalization with $U=V^T=sum_t D^{0.5}_{t-1}x_t$. I allows you to update the inverse of $aI$ by inverting a 20x20 matrix.
$endgroup$
– LinAlg
Dec 27 '18 at 0:02
$begingroup$
The thing is I don't know $T$ in advance. At each trial $t=1,2,...$ I need to invert $Ntimes N$ matrix. Where $N$ denotes the number of columns. I need to do it iteratively. Also, at each trial $x_tx_t'$ (covariance matrix) is not positive definite, rather semi-positive definite.
$endgroup$
– Waqas
Dec 27 '18 at 0:05
|
show 5 more comments
$begingroup$
so you want the inverse of the sum of two full rank matrices and expect Sherman Morrison to do it more efficiently?
$endgroup$
– LinAlg
Dec 26 '18 at 23:43
$begingroup$
how large is $T$?
$endgroup$
– LinAlg
Dec 26 '18 at 23:53
$begingroup$
We sequentially process $x_t,y_t$ and update $A_t$ at each itteration. $T=1,2,...$. In the above example $T=20$.
$endgroup$
– Waqas
Dec 26 '18 at 23:55
1
$begingroup$
Use this generalization with $U=V^T=sum_t D^{0.5}_{t-1}x_t$. I allows you to update the inverse of $aI$ by inverting a 20x20 matrix.
$endgroup$
– LinAlg
Dec 27 '18 at 0:02
$begingroup$
The thing is I don't know $T$ in advance. At each trial $t=1,2,...$ I need to invert $Ntimes N$ matrix. Where $N$ denotes the number of columns. I need to do it iteratively. Also, at each trial $x_tx_t'$ (covariance matrix) is not positive definite, rather semi-positive definite.
$endgroup$
– Waqas
Dec 27 '18 at 0:05
$begingroup$
so you want the inverse of the sum of two full rank matrices and expect Sherman Morrison to do it more efficiently?
$endgroup$
– LinAlg
Dec 26 '18 at 23:43
$begingroup$
so you want the inverse of the sum of two full rank matrices and expect Sherman Morrison to do it more efficiently?
$endgroup$
– LinAlg
Dec 26 '18 at 23:43
$begingroup$
how large is $T$?
$endgroup$
– LinAlg
Dec 26 '18 at 23:53
$begingroup$
how large is $T$?
$endgroup$
– LinAlg
Dec 26 '18 at 23:53
$begingroup$
We sequentially process $x_t,y_t$ and update $A_t$ at each itteration. $T=1,2,...$. In the above example $T=20$.
$endgroup$
– Waqas
Dec 26 '18 at 23:55
$begingroup$
We sequentially process $x_t,y_t$ and update $A_t$ at each itteration. $T=1,2,...$. In the above example $T=20$.
$endgroup$
– Waqas
Dec 26 '18 at 23:55
1
1
$begingroup$
Use this generalization with $U=V^T=sum_t D^{0.5}_{t-1}x_t$. I allows you to update the inverse of $aI$ by inverting a 20x20 matrix.
$endgroup$
– LinAlg
Dec 27 '18 at 0:02
$begingroup$
Use this generalization with $U=V^T=sum_t D^{0.5}_{t-1}x_t$. I allows you to update the inverse of $aI$ by inverting a 20x20 matrix.
$endgroup$
– LinAlg
Dec 27 '18 at 0:02
$begingroup$
The thing is I don't know $T$ in advance. At each trial $t=1,2,...$ I need to invert $Ntimes N$ matrix. Where $N$ denotes the number of columns. I need to do it iteratively. Also, at each trial $x_tx_t'$ (covariance matrix) is not positive definite, rather semi-positive definite.
$endgroup$
– Waqas
Dec 27 '18 at 0:05
$begingroup$
The thing is I don't know $T$ in advance. At each trial $t=1,2,...$ I need to invert $Ntimes N$ matrix. Where $N$ denotes the number of columns. I need to do it iteratively. Also, at each trial $x_tx_t'$ (covariance matrix) is not positive definite, rather semi-positive definite.
$endgroup$
– Waqas
Dec 27 '18 at 0:05
|
show 5 more comments
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3051972%2fwoodbury-matrix-inversion%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3051972%2fwoodbury-matrix-inversion%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
so you want the inverse of the sum of two full rank matrices and expect Sherman Morrison to do it more efficiently?
$endgroup$
– LinAlg
Dec 26 '18 at 23:43
$begingroup$
how large is $T$?
$endgroup$
– LinAlg
Dec 26 '18 at 23:53
$begingroup$
We sequentially process $x_t,y_t$ and update $A_t$ at each itteration. $T=1,2,...$. In the above example $T=20$.
$endgroup$
– Waqas
Dec 26 '18 at 23:55
1
$begingroup$
Use this generalization with $U=V^T=sum_t D^{0.5}_{t-1}x_t$. I allows you to update the inverse of $aI$ by inverting a 20x20 matrix.
$endgroup$
– LinAlg
Dec 27 '18 at 0:02
$begingroup$
The thing is I don't know $T$ in advance. At each trial $t=1,2,...$ I need to invert $Ntimes N$ matrix. Where $N$ denotes the number of columns. I need to do it iteratively. Also, at each trial $x_tx_t'$ (covariance matrix) is not positive definite, rather semi-positive definite.
$endgroup$
– Waqas
Dec 27 '18 at 0:05