[SciPy-user] [Fwd: Re: Computing eigenvalues by trace minimization]
Fri Jun 29 05:42:10 CDT 2007
> So, please update svn
> As for your code, I didn't make any changes. You need just specify
> desired contol and then make funtol, xtol, gradtol small enough. Maybe,
> in future I'll implement something more appropriate for to have exitflag
> BTW for small-scaled problem using df, dh didn't yields any benefits
> only for nVars = 100 I've got ~6 sec with df, dh provided and 11 sec
> without the ones.
> for your nVars=10 time elapsed is almost the same.
> HTH, D.
> Nils Wagner wrote:
> SciPy-user mailing list
Thank you for your help. BTW, have you managed the installation of symeig ?
1) you don't need to use .T in dot, it's executing automatically:
f = lambda x: dot(x.T,dot(A,x)) # => dot(x,dot(A,x))
h = lambda x: dot(x.T,dot(B,x))-1.0 # => dot(x,dot(B,x))-1.0
Let us assume that we are interested in the smallest m eigenvalues
instead of the smallest eigenvalue.
Then you will need .T in case of rectangular matrices x. Therefore I
have asked for
#f = lambda x: trace(dot(x.T,dot(A,x))) # Version for m > 1
#h = lambda x: dot(x.T,dot(B,x))-identity(m)
from scipy import dot, rand
n = 10
m = 3
A = rand(n,n)
x = rand(n,m)
res = dot(x.T,dot(A,x))
More information about the SciPy-user