- #1
feenaboccles
- 3
- 0
I'm working on a project where the following has to be solved on a regular basis, as new column vectors are added to the matrix X.
a = x' * inv (X * X') * X
where
m is the number of examples
d is the dimensionality of the vector x
x is d x 1 and norm2(x) <= 1
X is d x m, consisting of m "x" vectors arranged column-wise (not row-wise as is typically the case)
and
a should be m x 1
I'm wondering is there a faster way to calculate in Matlab, other than a direct implementation of the above. It's not an equation in the usual form Xw = y, so the built-in solver won't work. I'm wondering are there any decompositions that might help, but bear in mind that the equation is solved, then X is changed, then we return to solve the equation once more for a different x.
Thanks
a = x' * inv (X * X') * X
where
m is the number of examples
d is the dimensionality of the vector x
x is d x 1 and norm2(x) <= 1
X is d x m, consisting of m "x" vectors arranged column-wise (not row-wise as is typically the case)
and
a should be m x 1
I'm wondering is there a faster way to calculate in Matlab, other than a direct implementation of the above. It's not an equation in the usual form Xw = y, so the built-in solver won't work. I'm wondering are there any decompositions that might help, but bear in mind that the equation is solved, then X is changed, then we return to solve the equation once more for a different x.
Thanks