# [SciPy-user] symeig

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Oct 6 09:34:12 CDT 2004

Stuart Murdock wrote:

> Hi
> David Grant wrote:
>
>> Would it be possible to add something like symeig to scipy?
>> -------- Original Message --------
>> Subject:     Re: [SciPy-user] First few eigenvectors of a numarray array
>> Date:     Fri, 3 Sep 2004 17:07:06 +0200 (CEST)
>> From:     p.berkes at biologie.hu-berlin.de
>> Reply-To:     SciPy Users List <scipy-user at scipy.net>
>> To:     SciPy Users List <scipy-user at scipy.net>
>>
>>
>>
>> Hi Stuart,
>>
>> in fact MDP contains a function (mdp.utils.symeig), which provides
>> an interface to some LAPACK routines that are able to compute only
>> the first eigenvectors of a matrix, given that it is symmetrical
>> positive definite (which should be the case, since you're doing
>> PCA).
>
Why should the matrix be positive definite ?
Of course, symmetrie is clear.
If you are interested in an eigenpair (x,\lambda) nearest to a prescribed
shift, you can use the attached program.

Nils

>>
>
> I have been using mdp.utils.symeig for a while now and its seems
> pretty good and reliable. I also find the sqrtm function from
> MatPy pretty good, although I did have some trouble installing it with
> python 2.3 but the developers havent gotten back about that. I think
> more functions like these in scipy would give it a real cutting edge.
> I only wish I had the time / money to do it.  :-)
> Stuart
>
>> Pietro.
>>
>>
>> On Fri, 3 Sep 2004, Gary Ruben wrote:
>>
>>> Hi Stuart,
>>>
>>> It may well not be relevant to your needs, but since you mentioned
>>> you were doing PCA, you might want to look at the MDP package which
>>> was announced on this list a few days ago.
>>> http://mdp-toolkit.sourceforge.net/
>>>
>>> Gary
>>>
>>> ----- Original Message -----
>>> From: Stuart Murdock <s.e.murdock at soton.ac.uk>
>>> Date: Thu, 02 Sep 2004 19:50:57 +0000
>>> To: SciPy Users List <scipy-user at scipy.net>
>>> Subject: Re: [SciPy-user] First few eigenvectors of a numarray array
>>>
>>> > Hi Dave
>>> > > David Grant wrote:
>>> > > > When you say "top 10" do you mean the eigenvalues with the
>>> largest or > > smallest values?
>>> > >
>>> > > Primarily I would be concerned with the eigenvectors associated
>>> with the > largest eigenvalues as presently
>>> > I am interested in Principal Component Analysis of biomolecular >
>>> simulation trajectories. There are ways to approximate
>>> > the top eigenvector / eigenvalue, then get the next and so on but
>>> I was > wondering if there were any packages with those
>>> > types of algorithms already implemented.
>>> > > Thanks
>>> > > Stuart
>>> > > > I would also be interested in knowing if there is any
>>> mathematical way > > of doing this.  Sometimes for example in
>>> molecular simulations you > > only want to calculate the ground
>>> state energy, for example, and you > > don't care about the rest...
>>> > >
>>> > > Dave
>>> > >
>>> > >
>>> > > Stuart Murdock wrote:
>>> > >
>>> > >> Hi
>>> > >>
>>> > >> I have a 10000 by 10000 square numarray array which I have
>>> obtained > >> using numarray. I need to obtain the first 10
>>> eigenvalues and
>>> > >> eigenvectors of this so I dont want to have to calculate all >
>>> >> eigenvectors of the matrix. Is anyone aware of any pythonic
>>> packages > >> which
>>> > >> can calculate, lets say, the 10 eigenvectors corresponding to
>>> the top > >> 10 eigenvalues of a numarray array.
>>> > >>
>>> > >> There are a few functions which calculate all of the
>>> eigenvectors e.g.
>>> > >>
>>> > >> eig
>>> > >> eigenvectors
>>> > >>
>>> > >> but I only want to calculate the top few.
>>> > >>
>>> > >> Thanks
>>> > >>
>>> > >> Stuart
>>> > >>
>>> > >
>>> > >
>>> > >_______________________________________________
>>> > >SciPy-user mailing list
>>> > >SciPy-user at scipy.net
>>> > >http://www.scipy.net/mailman/listinfo/scipy-user
>>> > >  > >
>>> > > > -- > > Stuart Murdock Ph.D,
>>> > Research Fellow,
>>> > Dept. of Chemistry / E-Science,
>>> > University of Southampton,
>>> > Highfield, Southampton,
>>> > SO17 1BJ, United Kingdom
>>> >  > http://www.biosimgrid.org
>>> > > > > _______________________________________________
>>> > SciPy-user mailing list
>>> > SciPy-user at scipy.net
>>> > http://www.scipy.net/mailman/listinfo/scipy-user
>>>
>>>
>>
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user at scipy.net
>> http://www.scipy.net/mailman/listinfo/scipy-user
>>
>>
>>
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user at scipy.net
>> http://www.scipy.net/mailman/listinfo/scipy-user
>>
>>
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pca_invshift.py
Type: text/x-python
Size: 1556 bytes
Desc: not available
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20041006/aaa890ee/pca_invshift.py