a********x 发帖数: 4 | 1 其实应该算是 constrained principal component analysis. 如果我想把第一个
component定为一个 constant vector,然后依次求后面的component. 那么第二个
component 就应该是下面这个条件极值的解:
max_{x} x'W x
s.t. x'x = 1
x_{1}' x = 0
x_{1} 就是那个constant vector,W是一个正定矩阵。
请问这样的问题有没有什么简便的算法,或是有没有那个计算软件或者已经写好的程序
可以解这个问题。我试过用MATLAB里面的constrained minimizer 来解,不work。提前
谢了! |
a**a 发帖数: 416 | 2 Power Method...
【在 a********x 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 其实应该算是 constrained principal component analysis. 如果我想把第一个 : component定为一个 constant vector,然后依次求后面的component. 那么第二个 : component 就应该是下面这个条件极值的解: : max_{x} x'W x : s.t. x'x = 1 : x_{1}' x = 0 : x_{1} 就是那个constant vector,W是一个正定矩阵。 : 请问这样的问题有没有什么简便的算法,或是有没有那个计算软件或者已经写好的程序 : 可以解这个问题。我试过用MATLAB里面的constrained minimizer 来解,不work。提前 : 谢了!
|
r****y 发帖数: 1437 | 3 why? Just solve the eigenvalues and eigenvectors for
covariance matrix iteratively. There is numerical routine ready for this,
the first one is always 1st PC, etc.
In matlab, they have built-in PCA command, try princomp.
【在 a********x 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 其实应该算是 constrained principal component analysis. 如果我想把第一个 : component定为一个 constant vector,然后依次求后面的component. 那么第二个 : component 就应该是下面这个条件极值的解: : max_{x} x'W x : s.t. x'x = 1 : x_{1}' x = 0 : x_{1} 就是那个constant vector,W是一个正定矩阵。 : 请问这样的问题有没有什么简便的算法,或是有没有那个计算软件或者已经写好的程序 : 可以解这个问题。我试过用MATLAB里面的constrained minimizer 来解,不work。提前 : 谢了!
|
a********x 发帖数: 4 | 4 yeah, that would be just regular PCA. Now, my problem is I want to fix the
first PC equal to a constant vector, whereas the first PC generated by a
regular PCA usually is not a constant vector... |
a********x 发帖数: 4 | 5 Thanks! arya
But there is still one thing I'm not quite sure about. I know power method
is used to find eigen values/vectors. But here I have pre-selected a
constant vector as my first PC (they are different from the true dominant
eigen value and vector normally). So if I use this 'pseudo' pair eigen value
/vector as if they were the true ones to compute the nondominant eigen
values, would that work? Thanks again |
r**********e 发帖数: 133 | 6 I guess you might want to try the following:
Let \lambda=x_{1}'Wx_{1}, and then find PCA's for matrix
V=W-\lambda*x_{1}*x_{1}'.
【在 a********x 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 其实应该算是 constrained principal component analysis. 如果我想把第一个 : component定为一个 constant vector,然后依次求后面的component. 那么第二个 : component 就应该是下面这个条件极值的解: : max_{x} x'W x : s.t. x'x = 1 : x_{1}' x = 0 : x_{1} 就是那个constant vector,W是一个正定矩阵。 : 请问这样的问题有没有什么简便的算法,或是有没有那个计算软件或者已经写好的程序 : 可以解这个问题。我试过用MATLAB里面的constrained minimizer 来解,不work。提前 : 谢了!
|
a********x 发帖数: 4 | 7 thanks, randomOracle
I actually tried this. but since x_{1} is not really the eigen vector
associated with the largest eigen value. V = W -\lambda*x_{1}*x_{1}' is no
longer positive definite. In fact, there would be a negative eigen value,
which is quite salient...
but I guess this at least can serve as an ad hoc way to get some out...
Thanks for all your inputs. They are all very helpful |