Re: [Tutor] Help- Regarding python

2013-02-05 Thread Oscar Benjamin
On 5 February 2013 05:08, eryksun wrote: > On Mon, Feb 4, 2013 at 7:21 PM, Oscar Benjamin > wrote: >> eigenvalues, eigenvectors = np.linalg.eig(C) > > First sort by eigenvalue magnitude: > > >>> idx = np.argsort(eigenvalues)[::-1] > >>> print idx > [ 0 1 2 3 8 10 11 12 14 22 20 21

Re: [Tutor] Help- Regarding python

2013-02-04 Thread eryksun
On Mon, Feb 4, 2013 at 7:21 PM, Oscar Benjamin wrote: > eigenvalues, eigenvectors = np.linalg.eig(C) First sort by eigenvalue magnitude: >>> idx = np.argsort(eigenvalues)[::-1] >>> print idx [ 0 1 2 3 8 10 11 12 14 22 20 21 18 19 23 24 17 16 15 13 9 7 5 6 4] >>> eigenva

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Oscar Benjamin
On 4 February 2013 06:24, Gayathri S wrote: > Hi All! > If i have data set like this means... > > 3626,5000,2918,5000,2353,2334,2642,1730,1687,1695,1717,1744,593,502,493,504,449,431,444,444,429,10 > 438,498,3626,3629,5000,2918,5000,2640,2334,2639,1696,1687,1695,1717,1744,592,502,49

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Danny Yoo
> How to do PCA on this data? if it is in array how to do that? and also how > to use princomp() in PCA? Principal component analysis, http://en.wikipedia.org/wiki/Principal_component_analysis may not be "built in". Do you know for sure that it is? According to this blog entry, you can do

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Steven D'Aprano
On 04/02/13 17:24, Gayathri S wrote: Hi All! If i have data set like this means... 3626,5000,2918,5000,2353,2334,2642,[...],496. No need to dump your entire data set on us. Just a few representative values will do. How to do PCA on this data? if it is in array how to do tha

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Alan Gauld
On 04/02/13 06:24, Gayathri S wrote: Hi All! If i have data set like this means... 3626,5000,2918,5000,2353,2334,2642,1730,1687,1695,1717,1744,593,502,493,504,449,431,444,444,429,10 ... 458,5022,3640,3644,5000,2922,5000,2346,2321,2628,1688,1666,1674,1696,744,590,496. How to d

[Tutor] Help- Regarding python

2013-02-03 Thread Gayathri S
Hi All! If i have data set like this means... 3626,5000,2918,5000,2353,2334,2642,1730,1687,1695,1717,1744,593,502,493,504,449,431,444,444,429,10 438,498,3626,3629,5000,2918,5000,2640,2334,2639,1696,1687,1695,1717,1744,592,502,493,504,449,431,444,441,429,10 439,498,3626,3629,5000,29

Re: [Tutor] HELP-Regarding python

2013-01-30 Thread bob gailer
On 1/30/2013 1:51 AM, Gayathri S wrote: I am sorry that you chose to ignore my request to start a new email with a relevant subject. Please next time do so. The easier you make it for us to help you the more likely we will want to help. -- Bob Gailer 919-636-4239 Chapel Hill NC __

Re: [Tutor] HELP-Regarding python

2013-01-29 Thread spawgi
missed a parenthesis, it should look like - with open(, ) as : //operation with the file. On Wed, Jan 30, 2013 at 12:31 PM, wrote: > A safer approach would be - > with open(, as : > //operation with the file. > > This way, you do not have to remember to close the file explicitly. > > > On Wed,

Re: [Tutor] HELP-Regarding python

2013-01-29 Thread spawgi
A safer approach would be - with open(, as : //operation with the file. This way, you do not have to remember to close the file explicitly. On Wed, Jan 30, 2013 at 12:27 PM, Dave Angel wrote: > On 01/30/2013 01:51 AM, Gayathri S wrote: > >> Hi All! >> I don't know how to

Re: [Tutor] HELP-Regarding python

2013-01-29 Thread Dave Angel
On 01/30/2013 01:51 AM, Gayathri S wrote: Hi All! I don't know how to read text file in python. If the data values are stored in a text file format, for example(1,30,60,90,120...200) means what i would do for reading it in python. could you just explain it. infile = open

[Tutor] HELP-Regarding python

2013-01-29 Thread Gayathri S
Hi All! I don't know how to read text file in python. If the data values are stored in a text file format, for example(1,30,60,90,120...200) means what i would do for reading it in python. could you just explain it. Thanks! Keep Smiling.[?] Regards...