You can subscribe to this list here.
2004 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}
(1) 
_{Sep}

_{Oct}

_{Nov}
(1) 
_{Dec}


2005 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}
(1) 
_{Jul}

_{Aug}

_{Sep}

_{Oct}
(2) 
_{Nov}

_{Dec}
(1) 
2006 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}
(3) 
_{Jun}
(1) 
_{Jul}
(3) 
_{Aug}
(8) 
_{Sep}

_{Oct}

_{Nov}

_{Dec}

2007 
_{Jan}
(1) 
_{Feb}

_{Mar}
(1) 
_{Apr}

_{May}
(2) 
_{Jun}
(3) 
_{Jul}
(1) 
_{Aug}
(4) 
_{Sep}
(15) 
_{Oct}
(4) 
_{Nov}

_{Dec}

2008 
_{Jan}
(10) 
_{Feb}
(2) 
_{Mar}

_{Apr}

_{May}
(7) 
_{Jun}
(4) 
_{Jul}
(6) 
_{Aug}
(12) 
_{Sep}

_{Oct}
(3) 
_{Nov}
(13) 
_{Dec}
(10) 
2009 
_{Jan}
(12) 
_{Feb}
(19) 
_{Mar}
(27) 
_{Apr}

_{May}
(6) 
_{Jun}
(9) 
_{Jul}

_{Aug}
(5) 
_{Sep}
(12) 
_{Oct}
(20) 
_{Nov}
(1) 
_{Dec}
(8) 
2010 
_{Jan}
(5) 
_{Feb}
(8) 
_{Mar}
(3) 
_{Apr}
(4) 
_{May}
(3) 
_{Jun}
(12) 
_{Jul}
(22) 
_{Aug}
(19) 
_{Sep}
(7) 
_{Oct}
(7) 
_{Nov}
(7) 
_{Dec}
(21) 
2011 
_{Jan}
(10) 
_{Feb}
(18) 
_{Mar}
(26) 
_{Apr}
(12) 
_{May}

_{Jun}
(3) 
_{Jul}
(6) 
_{Aug}
(11) 
_{Sep}
(19) 
_{Oct}
(32) 
_{Nov}
(31) 
_{Dec}
(27) 
2012 
_{Jan}
(8) 
_{Feb}
(5) 
_{Mar}
(19) 
_{Apr}
(3) 
_{May}
(3) 
_{Jun}
(14) 
_{Jul}
(15) 
_{Aug}
(3) 
_{Sep}
(14) 
_{Oct}
(7) 
_{Nov}
(6) 
_{Dec}
(36) 
2013 
_{Jan}
(18) 
_{Feb}
(8) 
_{Mar}
(22) 
_{Apr}
(4) 
_{May}
(18) 
_{Jun}
(16) 
_{Jul}
(9) 
_{Aug}
(8) 
_{Sep}
(4) 
_{Oct}
(6) 
_{Nov}
(1) 
_{Dec}
(3) 
2014 
_{Jan}
(5) 
_{Feb}
(3) 
_{Mar}
(5) 
_{Apr}
(6) 
_{May}
(2) 
_{Jun}

_{Jul}
(4) 
_{Aug}
(4) 
_{Sep}
(7) 
_{Oct}
(3) 
_{Nov}
(5) 
_{Dec}
(3) 
2015 
_{Jan}
(1) 
_{Feb}

_{Mar}

_{Apr}
(1) 
_{May}
(2) 
_{Jun}

_{Jul}
(3) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 

1

2
(1) 
3

4

5
(1) 
6

7

8

9

10
(1) 
11
(3) 
12

13
(2) 
14

15

16
(1) 
17
(1) 
18
(1) 
19
(1) 
20
(3) 
21

22

23

24

25

26

27

28

29

30

31





From: Pietro Berkes <berkes@ga...>  20120720 15:54:04

On Fri, Jul 20, 2012 at 4:49 PM, Horea Christian <h.chr@...> wrote: > Hi pietro  I found out that I could get my previous code to work by > using whitened=True (to tell my ICANode that the input is already > whitened) the graphics I get with this code ( > https://github.com/TheChymera/pyASF/blob/bac0f2fbdb5a7f8e0aceb926a080a4e5d507335b/ASFpca.py > ) are as follows: http://i46.tinypic.com/358xrom.png > > I tried to use your expression (which also worked) and with that code > (https://github.com/TheChymera/pyASF/blob/047fde956a10307a187c8a5ddad70ed405c26b7d/ASFpca.py > ) I got this graphic: http://i48.tinypic.com/j0l4zq.png This code uses only PCA... > > The difference is quite striking  so obviously there must be a huge > difference between the two expressions. The first one looks more like > what I would wish to see  but what does the second one show exactly? > > Best, > Christian > > On Fr 20 Jul 2012 07:41:32 CEST, Pietro Berkes wrote: >> Hi Christian, >> >> your code is equivalent to >> >> ica = CubICANode(white_comp=10) >> result = ica(inpute) >> >> As we were discussing before, ICA nodes have an option to perform PCA >> before ICA. The step is useful to ICA because id decorrelates the data >> (removes 2nd order dependencies), which is a step towards trying to >> remove *all* dependencies (the goal of ICA). >> >> The additional step of projecting back to the input gives you as a >> user a "denoised" view of the data, but it does not make any >> difference to ICA: the reconstructed data in the input space still has >> only 10 effective dimensions (it lies on a 10dimensional plane in the >> input space by construction). This is also why you get the other >> error: the negative eigenvalues are due to small rounding effects, >> they are in effect zero (only 10 eigenvalues are larger than zero). >> >> I hope this description makes sense, otherwise I would recommend Chris >> Bishop's books >> http://research.microsoft.com/enus/um/people/cmbishop/books.htm >> (the two most recent ones). >> >> Best, >> Pietro >> >> >> On Thu, Jul 19, 2012 at 11:11 PM, Horea Christian<h.chr@...> wrote: >>> Actually I meant to reply to this post  I hope the double mail doesn't >>> upset anybody >>> >>> I used the code and that solved my problem However shortly >>> thereafter I noticed I have to rewrite most of the pca/ica stuff >>> because I was reducing the dimensionality along the wrong axis. Now >>> that I have rewritten everything I want to run a pca first (and keep >>> only my first 10 components)  reconstruct my data in input space and >>> then run ICA on that  I'm thinking PCA may be better suited to deal >>> with eliminating "junk" and the ICA can then "clarify" my components. >>> Is this a sensible approach? >>> >>> I do however have a small problem  when I run my code ICA complains >>> about getting negative eigenvalues (the number of which decreases the >>> more components I keep in the PCA outpput) Do you have any ideas how I >>> can sort this out? >>> >>> Here's my code: >>> https://github.com/TheChymera/pyASF/blob/master/ASFpca.py >>> >>> Thank you for your help, >>> Christian >>> >>> >>> >>> On 17.07.2012 15:40, Pietro Berkes wrote: >>>> On Mon, Jul 16, 2012 at 11:38 PM, Horea Christian<h.chr@...> wrote: >>>>> Hey guys! First off, I would like to thank you for helping me along the >>>>> way. I have made quite some progress with my script, but I just ran >>>>> into another problem which I was not able to solve over the weekend. >>>>> >>>>> I have my components and I want to map them *one by one* back to input >>>>> space. I try to do this with pca.inverse()  but apparently the >>>>> function wants its input to be 2d  why? is there any other way to >>>>> convert one single component back to input space? >>>> PCA projects an N dimensional space into a K dimensional one, were >>>> K<=N. I think in your case K is something like 3. Now you can only >>>> project back a K dimensional vector to the original input space. >>>> >>>> I think what you want to is project one of the K dimensions back, >>>> assuming the coefficient of all the others is zero: >>>> >>>> # creates an array of zero of the dimension as result >>>> result_component = numpy.zeros_like(result) >>>> # copy the component that you want to keep, in this case number 2 >>>> result_component[:,2] = result[:,2] >>>> # project the vector back >>>> result_img = pca.inverse(result_component) >>>> >>>> >>>>> Here is my code in full  the lines in question are 40ff. >>>>> https://github.com/TheChymera/pyASF/blob/master/ASFpca.py >>>>> >>>>> On Fr 13 Jul 2012 09:30:09 CEST, Pietro Berkes wrote: >>>>>> This line is already computing the pca coefficients for your input, >>>>>> it's equivalent to pca.execute(inp): >>>>>> >>>>>> result = pca(inp) >>>>>> >>>>>> this line computes the pca coefficients for the first 0 components: >>>>>> >>>>>> result_img = pca.execute(inp,0) >>>>>> >>>>>> >>>>>> My understanding is: you want to project your data on the PCA >>>>>> components, and then project it back on the image space. This is done >>>>>> like this: >>>>>> >>>>>> result = pca(inp) >>>>>> reconstruction = pca.inverse(result) >>>>>> >>>>>> P. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Fri, Jul 13, 2012 at 1:48 AM, Horea Christian<h.chr@...> wrote: >>>>>>> HEy again, thanks for the tips. I had come across PCANode.execute in >>>>>>> the docs  and I did try to use it by myself but I kept getting error >>>>>>> messages. Probably improper usage. >>>>>>> >>>>>>> I followed your advice and transposed my matrix so that it now has 80 >>>>>>> rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so >>>>>>> as to avoid memory errors). And I implemented the code as you suggested >>>>>>>  for reference you can find my code here http://paste2.org/p/2071709  >>>>>>> the pca thing is in lines 3238 >>>>>>> >>>>>>> Now, after I call the pca on the transposed matrix I get a resulting >>>>>>> array with 80 rows and 3 columns  seeing as I have 80 time steps I >>>>>>> decided to plot each column as a time series. The result seems to >>>>>>> confirm that this is already the "temporal information" I was looking >>>>>>> for. Now I'll just need the pixel maps of each component. pca.execute >>>>>>> gives me an array with 80 rows and 0 columns :/ so an empty array  I >>>>>>> tried pca._inverse as well, but that won't even run in that context  >>>>>>> am I using pca.execute badly? >>>>>>> >>>>>>> Many thanks, >>>>>>> Christian >>>>>>> >>>>>>> On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >>>>>>>>> Hey there, thanks for the reply  it helped a lot  my little script is >>>>>>>>> a lot faster now. But I still don't understand how I can visualize the >>>>>>>>> activity of my components  I mean I have fed 120 time steps into the >>>>>>>>> PCA  is there no way to visualize my data along those time steps? As I >>>>>>>>> understand my original data should be reconstructible from my output  >>>>>>>>> this doesn't hold If I just get 34 bitmaps as my components. >>>>>>>>> >>>>>>>> I think there is a bit of misunderstanding of what PCA means. Your >>>>>>>> time samples are living in a 504**2dimensional space. PCA looks at >>>>>>>> this cloud of points in this huge space and rotates the axes of the >>>>>>>> frame of reference such that one axis is aligned with the direction >>>>>>>> of maximum variance (the first principal component). It follows that >>>>>>>> all other axes (principal components) are then ordered by >>>>>>>> variance. >>>>>>>> >>>>>>>> The way it typically works is that you *train* PCA on some data. By >>>>>>>> doing this you learn the rotation matrix. You then apply the matrix >>>>>>>> to new, unkwown, data (the socalled test set). >>>>>>>> >>>>>>>> You can use this for example to reduce the dimensionality of your data >>>>>>>> while keeping as much information as possible. To do that you can select >>>>>>>> in this huge space only those axes which explain the most variance (say 90%), >>>>>>>> and disregard all the rest. So instead of applying the full rotation >>>>>>>> matrix, you apply only that part corresponding to the first N >>>>>>>> principal components. >>>>>>>> >>>>>>>> All of this is supported and documented in the PCANode. >>>>>>>> >>>>>>>> So, to come to your question, there is no "time course" in the >>>>>>>> principal components: they are "static". What you may be interested >>>>>>>> in is the time course of the test set projected onto, say, the first >>>>>>>> principal component. In MDP you do that by calling >>>>>>>> PCANode.execute(x, 0). >>>>>>>> Please look at the documentation for more info. >>>>>>>> >>>>>>>> May be you could have a read at some introduction to PCA. The >>>>>>>> Wikipedia article<http://en.wikipedia.org/wiki/Principal_component_analysis>; >>>>>>>> is unfortunately only a mediocre starting point. >>>>>>>> Tiziano >>>>>>>> >>>>>>>> >>>>>>>>  >>>>>>>> Live Security Virtual Conference >>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>> _______________________________________________ >>>>>>>> mdptoolkitusers mailing list >>>>>>>> mdptoolkitusers@... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>>>>  >>>>>>> Horea Christian >>>>>>> http://chymera.eu >>>>>>> >>>>>>>  >>>>>>> Live Security Virtual Conference >>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>> _______________________________________________ >>>>>>> mdptoolkitusers mailing list >>>>>>> mdptoolkitusers@... >>>>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>>>  >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> mdptoolkitusers mailing list >>>>>> mdptoolkitusers@... >>>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>>  >>>>> Horea Christian >>>>> http://chymera.eu >>>>> >>>>>  >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> mdptoolkitusers mailing list >>>>> mdptoolkitusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>  >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> mdptoolkitusers mailing list >>>> mdptoolkitusers@... >>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>> >>>  >>> Horea Christian >>> http://chymera.eu >>> >>> >>> >>> >>>  >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> mdptoolkitusers mailing list >>> mdptoolkitusers@... >>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >> >>  >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> mdptoolkitusers mailing list >> mdptoolkitusers@... >> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Horea Christian <h.chr@ma...>  20120720 15:49:34

Hi pietro  I found out that I could get my previous code to work by using whitened=True (to tell my ICANode that the input is already whitened) the graphics I get with this code ( https://github.com/TheChymera/pyASF/blob/bac0f2fbdb5a7f8e0aceb926a080a4e5d507335b/ASFpca.py ) are as follows: http://i46.tinypic.com/358xrom.png I tried to use your expression (which also worked) and with that code (https://github.com/TheChymera/pyASF/blob/047fde956a10307a187c8a5ddad70ed405c26b7d/ASFpca.py ) I got this graphic: http://i48.tinypic.com/j0l4zq.png The difference is quite striking  so obviously there must be a huge difference between the two expressions. The first one looks more like what I would wish to see  but what does the second one show exactly? Best, Christian On Fr 20 Jul 2012 07:41:32 CEST, Pietro Berkes wrote: > Hi Christian, > > your code is equivalent to > > ica = CubICANode(white_comp=10) > result = ica(inpute) > > As we were discussing before, ICA nodes have an option to perform PCA > before ICA. The step is useful to ICA because id decorrelates the data > (removes 2nd order dependencies), which is a step towards trying to > remove *all* dependencies (the goal of ICA). > > The additional step of projecting back to the input gives you as a > user a "denoised" view of the data, but it does not make any > difference to ICA: the reconstructed data in the input space still has > only 10 effective dimensions (it lies on a 10dimensional plane in the > input space by construction). This is also why you get the other > error: the negative eigenvalues are due to small rounding effects, > they are in effect zero (only 10 eigenvalues are larger than zero). > > I hope this description makes sense, otherwise I would recommend Chris > Bishop's books > http://research.microsoft.com/enus/um/people/cmbishop/books.htm > (the two most recent ones). > > Best, > Pietro > > > On Thu, Jul 19, 2012 at 11:11 PM, Horea Christian<h.chr@...> wrote: >> Actually I meant to reply to this post  I hope the double mail doesn't >> upset anybody >> >> I used the code and that solved my problem However shortly >> thereafter I noticed I have to rewrite most of the pca/ica stuff >> because I was reducing the dimensionality along the wrong axis. Now >> that I have rewritten everything I want to run a pca first (and keep >> only my first 10 components)  reconstruct my data in input space and >> then run ICA on that  I'm thinking PCA may be better suited to deal >> with eliminating "junk" and the ICA can then "clarify" my components. >> Is this a sensible approach? >> >> I do however have a small problem  when I run my code ICA complains >> about getting negative eigenvalues (the number of which decreases the >> more components I keep in the PCA outpput) Do you have any ideas how I >> can sort this out? >> >> Here's my code: >> https://github.com/TheChymera/pyASF/blob/master/ASFpca.py >> >> Thank you for your help, >> Christian >> >> >> >> On 17.07.2012 15:40, Pietro Berkes wrote: >>> On Mon, Jul 16, 2012 at 11:38 PM, Horea Christian<h.chr@...> wrote: >>>> Hey guys! First off, I would like to thank you for helping me along the >>>> way. I have made quite some progress with my script, but I just ran >>>> into another problem which I was not able to solve over the weekend. >>>> >>>> I have my components and I want to map them *one by one* back to input >>>> space. I try to do this with pca.inverse()  but apparently the >>>> function wants its input to be 2d  why? is there any other way to >>>> convert one single component back to input space? >>> PCA projects an N dimensional space into a K dimensional one, were >>> K<=N. I think in your case K is something like 3. Now you can only >>> project back a K dimensional vector to the original input space. >>> >>> I think what you want to is project one of the K dimensions back, >>> assuming the coefficient of all the others is zero: >>> >>> # creates an array of zero of the dimension as result >>> result_component = numpy.zeros_like(result) >>> # copy the component that you want to keep, in this case number 2 >>> result_component[:,2] = result[:,2] >>> # project the vector back >>> result_img = pca.inverse(result_component) >>> >>> >>>> Here is my code in full  the lines in question are 40ff. >>>> https://github.com/TheChymera/pyASF/blob/master/ASFpca.py >>>> >>>> On Fr 13 Jul 2012 09:30:09 CEST, Pietro Berkes wrote: >>>>> This line is already computing the pca coefficients for your input, >>>>> it's equivalent to pca.execute(inp): >>>>> >>>>> result = pca(inp) >>>>> >>>>> this line computes the pca coefficients for the first 0 components: >>>>> >>>>> result_img = pca.execute(inp,0) >>>>> >>>>> >>>>> My understanding is: you want to project your data on the PCA >>>>> components, and then project it back on the image space. This is done >>>>> like this: >>>>> >>>>> result = pca(inp) >>>>> reconstruction = pca.inverse(result) >>>>> >>>>> P. >>>>> >>>>> >>>>> >>>>> >>>>> On Fri, Jul 13, 2012 at 1:48 AM, Horea Christian<h.chr@...> wrote: >>>>>> HEy again, thanks for the tips. I had come across PCANode.execute in >>>>>> the docs  and I did try to use it by myself but I kept getting error >>>>>> messages. Probably improper usage. >>>>>> >>>>>> I followed your advice and transposed my matrix so that it now has 80 >>>>>> rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so >>>>>> as to avoid memory errors). And I implemented the code as you suggested >>>>>>  for reference you can find my code here http://paste2.org/p/2071709  >>>>>> the pca thing is in lines 3238 >>>>>> >>>>>> Now, after I call the pca on the transposed matrix I get a resulting >>>>>> array with 80 rows and 3 columns  seeing as I have 80 time steps I >>>>>> decided to plot each column as a time series. The result seems to >>>>>> confirm that this is already the "temporal information" I was looking >>>>>> for. Now I'll just need the pixel maps of each component. pca.execute >>>>>> gives me an array with 80 rows and 0 columns :/ so an empty array  I >>>>>> tried pca._inverse as well, but that won't even run in that context  >>>>>> am I using pca.execute badly? >>>>>> >>>>>> Many thanks, >>>>>> Christian >>>>>> >>>>>> On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >>>>>>>> Hey there, thanks for the reply  it helped a lot  my little script is >>>>>>>> a lot faster now. But I still don't understand how I can visualize the >>>>>>>> activity of my components  I mean I have fed 120 time steps into the >>>>>>>> PCA  is there no way to visualize my data along those time steps? As I >>>>>>>> understand my original data should be reconstructible from my output  >>>>>>>> this doesn't hold If I just get 34 bitmaps as my components. >>>>>>>> >>>>>>> I think there is a bit of misunderstanding of what PCA means. Your >>>>>>> time samples are living in a 504**2dimensional space. PCA looks at >>>>>>> this cloud of points in this huge space and rotates the axes of the >>>>>>> frame of reference such that one axis is aligned with the direction >>>>>>> of maximum variance (the first principal component). It follows that >>>>>>> all other axes (principal components) are then ordered by >>>>>>> variance. >>>>>>> >>>>>>> The way it typically works is that you *train* PCA on some data. By >>>>>>> doing this you learn the rotation matrix. You then apply the matrix >>>>>>> to new, unkwown, data (the socalled test set). >>>>>>> >>>>>>> You can use this for example to reduce the dimensionality of your data >>>>>>> while keeping as much information as possible. To do that you can select >>>>>>> in this huge space only those axes which explain the most variance (say 90%), >>>>>>> and disregard all the rest. So instead of applying the full rotation >>>>>>> matrix, you apply only that part corresponding to the first N >>>>>>> principal components. >>>>>>> >>>>>>> All of this is supported and documented in the PCANode. >>>>>>> >>>>>>> So, to come to your question, there is no "time course" in the >>>>>>> principal components: they are "static". What you may be interested >>>>>>> in is the time course of the test set projected onto, say, the first >>>>>>> principal component. In MDP you do that by calling >>>>>>> PCANode.execute(x, 0). >>>>>>> Please look at the documentation for more info. >>>>>>> >>>>>>> May be you could have a read at some introduction to PCA. The >>>>>>> Wikipedia article<http://en.wikipedia.org/wiki/Principal_component_analysis>; >>>>>>> is unfortunately only a mediocre starting point. >>>>>>> Tiziano >>>>>>> >>>>>>> >>>>>>>  >>>>>>> Live Security Virtual Conference >>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>> _______________________________________________ >>>>>>> mdptoolkitusers mailing list >>>>>>> mdptoolkitusers@... >>>>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>>>  >>>>>> Horea Christian >>>>>> http://chymera.eu >>>>>> >>>>>>  >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> mdptoolkitusers mailing list >>>>>> mdptoolkitusers@... >>>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>>  >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> mdptoolkitusers mailing list >>>>> mdptoolkitusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>  >>>> Horea Christian >>>> http://chymera.eu >>>> >>>>  >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> mdptoolkitusers mailing list >>>> mdptoolkitusers@... >>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>  >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> mdptoolkitusers mailing list >>> mdptoolkitusers@... >>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >> >>  >> Horea Christian >> http://chymera.eu >> >> >> >> >>  >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> mdptoolkitusers mailing list >> mdptoolkitusers@... >> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Pietro Berkes <berkes@ga...>  20120720 05:42:00

Hi Christian, your code is equivalent to ica = CubICANode(white_comp=10) result = ica(inpute) As we were discussing before, ICA nodes have an option to perform PCA before ICA. The step is useful to ICA because id decorrelates the data (removes 2nd order dependencies), which is a step towards trying to remove *all* dependencies (the goal of ICA). The additional step of projecting back to the input gives you as a user a "denoised" view of the data, but it does not make any difference to ICA: the reconstructed data in the input space still has only 10 effective dimensions (it lies on a 10dimensional plane in the input space by construction). This is also why you get the other error: the negative eigenvalues are due to small rounding effects, they are in effect zero (only 10 eigenvalues are larger than zero). I hope this description makes sense, otherwise I would recommend Chris Bishop's books http://research.microsoft.com/enus/um/people/cmbishop/books.htm (the two most recent ones). Best, Pietro On Thu, Jul 19, 2012 at 11:11 PM, Horea Christian <h.chr@...> wrote: > Actually I meant to reply to this post  I hope the double mail doesn't > upset anybody > > I used the code and that solved my problem However shortly > thereafter I noticed I have to rewrite most of the pca/ica stuff > because I was reducing the dimensionality along the wrong axis. Now > that I have rewritten everything I want to run a pca first (and keep > only my first 10 components)  reconstruct my data in input space and > then run ICA on that  I'm thinking PCA may be better suited to deal > with eliminating "junk" and the ICA can then "clarify" my components. > Is this a sensible approach? > > I do however have a small problem  when I run my code ICA complains > about getting negative eigenvalues (the number of which decreases the > more components I keep in the PCA outpput) Do you have any ideas how I > can sort this out? > > Here's my code: > https://github.com/TheChymera/pyASF/blob/master/ASFpca.py > > Thank you for your help, > Christian > > > > On 17.07.2012 15:40, Pietro Berkes wrote: >> On Mon, Jul 16, 2012 at 11:38 PM, Horea Christian <h.chr@...> wrote: >>> Hey guys! First off, I would like to thank you for helping me along the >>> way. I have made quite some progress with my script, but I just ran >>> into another problem which I was not able to solve over the weekend. >>> >>> I have my components and I want to map them *one by one* back to input >>> space. I try to do this with pca.inverse()  but apparently the >>> function wants its input to be 2d  why? is there any other way to >>> convert one single component back to input space? >> PCA projects an N dimensional space into a K dimensional one, were >> K<=N. I think in your case K is something like 3. Now you can only >> project back a K dimensional vector to the original input space. >> >> I think what you want to is project one of the K dimensions back, >> assuming the coefficient of all the others is zero: >> >> # creates an array of zero of the dimension as result >> result_component = numpy.zeros_like(result) >> # copy the component that you want to keep, in this case number 2 >> result_component[:,2] = result[:,2] >> # project the vector back >> result_img = pca.inverse(result_component) >> >> >>> Here is my code in full  the lines in question are 40ff. >>> https://github.com/TheChymera/pyASF/blob/master/ASFpca.py >>> >>> On Fr 13 Jul 2012 09:30:09 CEST, Pietro Berkes wrote: >>>> This line is already computing the pca coefficients for your input, >>>> it's equivalent to pca.execute(inp): >>>> >>>> result = pca(inp) >>>> >>>> this line computes the pca coefficients for the first 0 components: >>>> >>>> result_img = pca.execute(inp,0) >>>> >>>> >>>> My understanding is: you want to project your data on the PCA >>>> components, and then project it back on the image space. This is done >>>> like this: >>>> >>>> result = pca(inp) >>>> reconstruction = pca.inverse(result) >>>> >>>> P. >>>> >>>> >>>> >>>> >>>> On Fri, Jul 13, 2012 at 1:48 AM, Horea Christian <h.chr@...> wrote: >>>>> HEy again, thanks for the tips. I had come across PCANode.execute in >>>>> the docs  and I did try to use it by myself but I kept getting error >>>>> messages. Probably improper usage. >>>>> >>>>> I followed your advice and transposed my matrix so that it now has 80 >>>>> rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so >>>>> as to avoid memory errors). And I implemented the code as you suggested >>>>>  for reference you can find my code here http://paste2.org/p/2071709  >>>>> the pca thing is in lines 3238 >>>>> >>>>> Now, after I call the pca on the transposed matrix I get a resulting >>>>> array with 80 rows and 3 columns  seeing as I have 80 time steps I >>>>> decided to plot each column as a time series. The result seems to >>>>> confirm that this is already the "temporal information" I was looking >>>>> for. Now I'll just need the pixel maps of each component. pca.execute >>>>> gives me an array with 80 rows and 0 columns :/ so an empty array  I >>>>> tried pca._inverse as well, but that won't even run in that context  >>>>> am I using pca.execute badly? >>>>> >>>>> Many thanks, >>>>> Christian >>>>> >>>>> On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >>>>>>> Hey there, thanks for the reply  it helped a lot  my little script is >>>>>>> a lot faster now. But I still don't understand how I can visualize the >>>>>>> activity of my components  I mean I have fed 120 time steps into the >>>>>>> PCA  is there no way to visualize my data along those time steps? As I >>>>>>> understand my original data should be reconstructible from my output  >>>>>>> this doesn't hold If I just get 34 bitmaps as my components. >>>>>>> >>>>>> I think there is a bit of misunderstanding of what PCA means. Your >>>>>> time samples are living in a 504**2dimensional space. PCA looks at >>>>>> this cloud of points in this huge space and rotates the axes of the >>>>>> frame of reference such that one axis is aligned with the direction >>>>>> of maximum variance (the first principal component). It follows that >>>>>> all other axes (principal components) are then ordered by >>>>>> variance. >>>>>> >>>>>> The way it typically works is that you *train* PCA on some data. By >>>>>> doing this you learn the rotation matrix. You then apply the matrix >>>>>> to new, unkwown, data (the socalled test set). >>>>>> >>>>>> You can use this for example to reduce the dimensionality of your data >>>>>> while keeping as much information as possible. To do that you can select >>>>>> in this huge space only those axes which explain the most variance (say 90%), >>>>>> and disregard all the rest. So instead of applying the full rotation >>>>>> matrix, you apply only that part corresponding to the first N >>>>>> principal components. >>>>>> >>>>>> All of this is supported and documented in the PCANode. >>>>>> >>>>>> So, to come to your question, there is no "time course" in the >>>>>> principal components: they are "static". What you may be interested >>>>>> in is the time course of the test set projected onto, say, the first >>>>>> principal component. In MDP you do that by calling >>>>>> PCANode.execute(x, 0). >>>>>> Please look at the documentation for more info. >>>>>> >>>>>> May be you could have a read at some introduction to PCA. The >>>>>> Wikipedia article <http://en.wikipedia.org/wiki/Principal_component_analysis>; >>>>>> is unfortunately only a mediocre starting point. >>>>>> Tiziano >>>>>> >>>>>> >>>>>>  >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> mdptoolkitusers mailing list >>>>>> mdptoolkitusers@... >>>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>>  >>>>> Horea Christian >>>>> http://chymera.eu >>>>> >>>>>  >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> mdptoolkitusers mailing list >>>>> mdptoolkitusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>  >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> mdptoolkitusers mailing list >>>> mdptoolkitusers@... >>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>  >>> Horea Christian >>> http://chymera.eu >>> >>>  >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> mdptoolkitusers mailing list >>> mdptoolkitusers@... >>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>  >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> mdptoolkitusers mailing list >> mdptoolkitusers@... >> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers > >  > Horea Christian > http://chymera.eu > > > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Horea Christian <h.chr@ma...>  20120719 22:12:04

Actually I meant to reply to this post  I hope the double mail doesn't upset anybody I used the code and that solved my problem However shortly thereafter I noticed I have to rewrite most of the pca/ica stuff because I was reducing the dimensionality along the wrong axis. Now that I have rewritten everything I want to run a pca first (and keep only my first 10 components)  reconstruct my data in input space and then run ICA on that  I'm thinking PCA may be better suited to deal with eliminating "junk" and the ICA can then "clarify" my components. Is this a sensible approach? I do however have a small problem  when I run my code ICA complains about getting negative eigenvalues (the number of which decreases the more components I keep in the PCA outpput) Do you have any ideas how I can sort this out? Here's my code: https://github.com/TheChymera/pyASF/blob/master/ASFpca.py Thank you for your help, Christian On 17.07.2012 15:40, Pietro Berkes wrote: > On Mon, Jul 16, 2012 at 11:38 PM, Horea Christian <h.chr@...> wrote: >> Hey guys! First off, I would like to thank you for helping me along the >> way. I have made quite some progress with my script, but I just ran >> into another problem which I was not able to solve over the weekend. >> >> I have my components and I want to map them *one by one* back to input >> space. I try to do this with pca.inverse()  but apparently the >> function wants its input to be 2d  why? is there any other way to >> convert one single component back to input space? > PCA projects an N dimensional space into a K dimensional one, were > K<=N. I think in your case K is something like 3. Now you can only > project back a K dimensional vector to the original input space. > > I think what you want to is project one of the K dimensions back, > assuming the coefficient of all the others is zero: > > # creates an array of zero of the dimension as result > result_component = numpy.zeros_like(result) > # copy the component that you want to keep, in this case number 2 > result_component[:,2] = result[:,2] > # project the vector back > result_img = pca.inverse(result_component) > > >> Here is my code in full  the lines in question are 40ff. >> https://github.com/TheChymera/pyASF/blob/master/ASFpca.py >> >> On Fr 13 Jul 2012 09:30:09 CEST, Pietro Berkes wrote: >>> This line is already computing the pca coefficients for your input, >>> it's equivalent to pca.execute(inp): >>> >>> result = pca(inp) >>> >>> this line computes the pca coefficients for the first 0 components: >>> >>> result_img = pca.execute(inp,0) >>> >>> >>> My understanding is: you want to project your data on the PCA >>> components, and then project it back on the image space. This is done >>> like this: >>> >>> result = pca(inp) >>> reconstruction = pca.inverse(result) >>> >>> P. >>> >>> >>> >>> >>> On Fri, Jul 13, 2012 at 1:48 AM, Horea Christian <h.chr@...> wrote: >>>> HEy again, thanks for the tips. I had come across PCANode.execute in >>>> the docs  and I did try to use it by myself but I kept getting error >>>> messages. Probably improper usage. >>>> >>>> I followed your advice and transposed my matrix so that it now has 80 >>>> rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so >>>> as to avoid memory errors). And I implemented the code as you suggested >>>>  for reference you can find my code here http://paste2.org/p/2071709  >>>> the pca thing is in lines 3238 >>>> >>>> Now, after I call the pca on the transposed matrix I get a resulting >>>> array with 80 rows and 3 columns  seeing as I have 80 time steps I >>>> decided to plot each column as a time series. The result seems to >>>> confirm that this is already the "temporal information" I was looking >>>> for. Now I'll just need the pixel maps of each component. pca.execute >>>> gives me an array with 80 rows and 0 columns :/ so an empty array  I >>>> tried pca._inverse as well, but that won't even run in that context  >>>> am I using pca.execute badly? >>>> >>>> Many thanks, >>>> Christian >>>> >>>> On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >>>>>> Hey there, thanks for the reply  it helped a lot  my little script is >>>>>> a lot faster now. But I still don't understand how I can visualize the >>>>>> activity of my components  I mean I have fed 120 time steps into the >>>>>> PCA  is there no way to visualize my data along those time steps? As I >>>>>> understand my original data should be reconstructible from my output  >>>>>> this doesn't hold If I just get 34 bitmaps as my components. >>>>>> >>>>> I think there is a bit of misunderstanding of what PCA means. Your >>>>> time samples are living in a 504**2dimensional space. PCA looks at >>>>> this cloud of points in this huge space and rotates the axes of the >>>>> frame of reference such that one axis is aligned with the direction >>>>> of maximum variance (the first principal component). It follows that >>>>> all other axes (principal components) are then ordered by >>>>> variance. >>>>> >>>>> The way it typically works is that you *train* PCA on some data. By >>>>> doing this you learn the rotation matrix. You then apply the matrix >>>>> to new, unkwown, data (the socalled test set). >>>>> >>>>> You can use this for example to reduce the dimensionality of your data >>>>> while keeping as much information as possible. To do that you can select >>>>> in this huge space only those axes which explain the most variance (say 90%), >>>>> and disregard all the rest. So instead of applying the full rotation >>>>> matrix, you apply only that part corresponding to the first N >>>>> principal components. >>>>> >>>>> All of this is supported and documented in the PCANode. >>>>> >>>>> So, to come to your question, there is no "time course" in the >>>>> principal components: they are "static". What you may be interested >>>>> in is the time course of the test set projected onto, say, the first >>>>> principal component. In MDP you do that by calling >>>>> PCANode.execute(x, 0). >>>>> Please look at the documentation for more info. >>>>> >>>>> May be you could have a read at some introduction to PCA. The >>>>> Wikipedia article <http://en.wikipedia.org/wiki/Principal_component_analysis>; >>>>> is unfortunately only a mediocre starting point. >>>>> Tiziano >>>>> >>>>> >>>>>  >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> mdptoolkitusers mailing list >>>>> mdptoolkitusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>>  >>>> Horea Christian >>>> http://chymera.eu >>>> >>>>  >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> mdptoolkitusers mailing list >>>> mdptoolkitusers@... >>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>>  >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> mdptoolkitusers mailing list >>> mdptoolkitusers@... >>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>  >> Horea Christian >> http://chymera.eu >> >>  >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> mdptoolkitusers mailing list >> mdptoolkitusers@... >> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers  Horea Christian http://chymera.eu 
From: Horea Christian <h.chr@ma...>  20120718 18:06:04

I used the code and that solved my problem :) However shortly thereafter I noticed I have to rewrite most of the pca/ica stuff because I was reducing the dimensionality along the wrong axis. Now that I have rewritten everything I want to run a pca first (and keep only my first 10 components)  reconstruct my data in input space and then run ICA on that  I'm thinking PCA may be better suited to deal with eliminating "junk" and the ica can then "clarify" my components. Is this a sensible approach? I do however have a small problem  when I run my code ICA complains about getting negative eigenvalues (the number of which decreases the more components I keep in the PCA outpput) Do you have any ideas how I can sort this out? Here's my code: https://github.com/TheChymera/pyASF/blob/master/ASFpca.py Thank you for your help, Christian On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >> Hey there, thanks for the reply  it helped a lot  my little script is >> a lot faster now. But I still don't understand how I can visualize the >> activity of my components  I mean I have fed 120 time steps into the >> PCA  is there no way to visualize my data along those time steps? As I >> understand my original data should be reconstructible from my output  >> this doesn't hold If I just get 34 bitmaps as my components. >> > > I think there is a bit of misunderstanding of what PCA means. Your > time samples are living in a 504**2dimensional space. PCA looks at > this cloud of points in this huge space and rotates the axes of the > frame of reference such that one axis is aligned with the direction > of maximum variance (the first principal component). It follows that > all other axes (principal components) are then ordered by > variance. > > The way it typically works is that you *train* PCA on some data. By > doing this you learn the rotation matrix. You then apply the matrix > to new, unkwown, data (the socalled test set). > > You can use this for example to reduce the dimensionality of your data > while keeping as much information as possible. To do that you can select > in this huge space only those axes which explain the most variance (say 90%), > and disregard all the rest. So instead of applying the full rotation > matrix, you apply only that part corresponding to the first N > principal components. > > All of this is supported and documented in the PCANode. > > So, to come to your question, there is no "time course" in the > principal components: they are "static". What you may be interested > in is the time course of the test set projected onto, say, the first > principal component. In MDP you do that by calling > PCANode.execute(x, 0). > Please look at the documentation for more info. > > May be you could have a read at some introduction to PCA. The > Wikipedia article<http://en.wikipedia.org/wiki/Principal_component_analysis>; > is unfortunately only a mediocre starting point. > Tiziano > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Pietro Berkes <berkes@ga...>  20120717 13:40:36

On Mon, Jul 16, 2012 at 11:38 PM, Horea Christian <h.chr@...> wrote: > Hey guys! First off, I would like to thank you for helping me along the > way. I have made quite some progress with my script, but I just ran > into another problem which I was not able to solve over the weekend. > > I have my components and I want to map them *one by one* back to input > space. I try to do this with pca.inverse()  but apparently the > function wants its input to be 2d  why? is there any other way to > convert one single component back to input space? PCA projects an N dimensional space into a K dimensional one, were K<=N. I think in your case K is something like 3. Now you can only project back a K dimensional vector to the original input space. I think what you want to is project one of the K dimensions back, assuming the coefficient of all the others is zero: # creates an array of zero of the dimension as result result_component = numpy.zeros_like(result) # copy the component that you want to keep, in this case number 2 result_component[:,2] = result[:,2] # project the vector back result_img = pca.inverse(result_component) > > Here is my code in full  the lines in question are 40ff. > https://github.com/TheChymera/pyASF/blob/master/ASFpca.py > > On Fr 13 Jul 2012 09:30:09 CEST, Pietro Berkes wrote: >> This line is already computing the pca coefficients for your input, >> it's equivalent to pca.execute(inp): >> >> result = pca(inp) >> >> this line computes the pca coefficients for the first 0 components: >> >> result_img = pca.execute(inp,0) >> >> >> My understanding is: you want to project your data on the PCA >> components, and then project it back on the image space. This is done >> like this: >> >> result = pca(inp) >> reconstruction = pca.inverse(result) >> >> P. >> >> >> >> >> On Fri, Jul 13, 2012 at 1:48 AM, Horea Christian <h.chr@...> wrote: >>> HEy again, thanks for the tips. I had come across PCANode.execute in >>> the docs  and I did try to use it by myself but I kept getting error >>> messages. Probably improper usage. >>> >>> I followed your advice and transposed my matrix so that it now has 80 >>> rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so >>> as to avoid memory errors). And I implemented the code as you suggested >>>  for reference you can find my code here http://paste2.org/p/2071709  >>> the pca thing is in lines 3238 >>> >>> Now, after I call the pca on the transposed matrix I get a resulting >>> array with 80 rows and 3 columns  seeing as I have 80 time steps I >>> decided to plot each column as a time series. The result seems to >>> confirm that this is already the "temporal information" I was looking >>> for. Now I'll just need the pixel maps of each component. pca.execute >>> gives me an array with 80 rows and 0 columns :/ so an empty array  I >>> tried pca._inverse as well, but that won't even run in that context  >>> am I using pca.execute badly? >>> >>> Many thanks, >>> Christian >>> >>> On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >>>>> Hey there, thanks for the reply  it helped a lot  my little script is >>>>> a lot faster now. But I still don't understand how I can visualize the >>>>> activity of my components  I mean I have fed 120 time steps into the >>>>> PCA  is there no way to visualize my data along those time steps? As I >>>>> understand my original data should be reconstructible from my output  >>>>> this doesn't hold If I just get 34 bitmaps as my components. >>>>> >>>> >>>> I think there is a bit of misunderstanding of what PCA means. Your >>>> time samples are living in a 504**2dimensional space. PCA looks at >>>> this cloud of points in this huge space and rotates the axes of the >>>> frame of reference such that one axis is aligned with the direction >>>> of maximum variance (the first principal component). It follows that >>>> all other axes (principal components) are then ordered by >>>> variance. >>>> >>>> The way it typically works is that you *train* PCA on some data. By >>>> doing this you learn the rotation matrix. You then apply the matrix >>>> to new, unkwown, data (the socalled test set). >>>> >>>> You can use this for example to reduce the dimensionality of your data >>>> while keeping as much information as possible. To do that you can select >>>> in this huge space only those axes which explain the most variance (say 90%), >>>> and disregard all the rest. So instead of applying the full rotation >>>> matrix, you apply only that part corresponding to the first N >>>> principal components. >>>> >>>> All of this is supported and documented in the PCANode. >>>> >>>> So, to come to your question, there is no "time course" in the >>>> principal components: they are "static". What you may be interested >>>> in is the time course of the test set projected onto, say, the first >>>> principal component. In MDP you do that by calling >>>> PCANode.execute(x, 0). >>>> Please look at the documentation for more info. >>>> >>>> May be you could have a read at some introduction to PCA. The >>>> Wikipedia article <http://en.wikipedia.org/wiki/Principal_component_analysis>; >>>> is unfortunately only a mediocre starting point. >>>> Tiziano >>>> >>>> >>>>  >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> mdptoolkitusers mailing list >>>> mdptoolkitusers@... >>>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >>> >>>  >>> Horea Christian >>> http://chymera.eu >>> >>>  >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> mdptoolkitusers mailing list >>> mdptoolkitusers@... >>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >> >>  >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> mdptoolkitusers mailing list >> mdptoolkitusers@... >> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers > >  > Horea Christian > http://chymera.eu > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Horea Christian <h.chr@ma...>  20120716 22:38:24

Hey guys! First off, I would like to thank you for helping me along the way. I have made quite some progress with my script, but I just ran into another problem which I was not able to solve over the weekend. I have my components and I want to map them *one by one* back to input space. I try to do this with pca.inverse()  but apparently the function wants its input to be 2d  why? is there any other way to convert one single component back to input space? Here is my code in full  the lines in question are 40ff. https://github.com/TheChymera/pyASF/blob/master/ASFpca.py On Fr 13 Jul 2012 09:30:09 CEST, Pietro Berkes wrote: > This line is already computing the pca coefficients for your input, > it's equivalent to pca.execute(inp): > > result = pca(inp) > > this line computes the pca coefficients for the first 0 components: > > result_img = pca.execute(inp,0) > > > My understanding is: you want to project your data on the PCA > components, and then project it back on the image space. This is done > like this: > > result = pca(inp) > reconstruction = pca.inverse(result) > > P. > > > > > On Fri, Jul 13, 2012 at 1:48 AM, Horea Christian <h.chr@...> wrote: >> HEy again, thanks for the tips. I had come across PCANode.execute in >> the docs  and I did try to use it by myself but I kept getting error >> messages. Probably improper usage. >> >> I followed your advice and transposed my matrix so that it now has 80 >> rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so >> as to avoid memory errors). And I implemented the code as you suggested >>  for reference you can find my code here http://paste2.org/p/2071709  >> the pca thing is in lines 3238 >> >> Now, after I call the pca on the transposed matrix I get a resulting >> array with 80 rows and 3 columns  seeing as I have 80 time steps I >> decided to plot each column as a time series. The result seems to >> confirm that this is already the "temporal information" I was looking >> for. Now I'll just need the pixel maps of each component. pca.execute >> gives me an array with 80 rows and 0 columns :/ so an empty array  I >> tried pca._inverse as well, but that won't even run in that context  >> am I using pca.execute badly? >> >> Many thanks, >> Christian >> >> On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >>>> Hey there, thanks for the reply  it helped a lot  my little script is >>>> a lot faster now. But I still don't understand how I can visualize the >>>> activity of my components  I mean I have fed 120 time steps into the >>>> PCA  is there no way to visualize my data along those time steps? As I >>>> understand my original data should be reconstructible from my output  >>>> this doesn't hold If I just get 34 bitmaps as my components. >>>> >>> >>> I think there is a bit of misunderstanding of what PCA means. Your >>> time samples are living in a 504**2dimensional space. PCA looks at >>> this cloud of points in this huge space and rotates the axes of the >>> frame of reference such that one axis is aligned with the direction >>> of maximum variance (the first principal component). It follows that >>> all other axes (principal components) are then ordered by >>> variance. >>> >>> The way it typically works is that you *train* PCA on some data. By >>> doing this you learn the rotation matrix. You then apply the matrix >>> to new, unkwown, data (the socalled test set). >>> >>> You can use this for example to reduce the dimensionality of your data >>> while keeping as much information as possible. To do that you can select >>> in this huge space only those axes which explain the most variance (say 90%), >>> and disregard all the rest. So instead of applying the full rotation >>> matrix, you apply only that part corresponding to the first N >>> principal components. >>> >>> All of this is supported and documented in the PCANode. >>> >>> So, to come to your question, there is no "time course" in the >>> principal components: they are "static". What you may be interested >>> in is the time course of the test set projected onto, say, the first >>> principal component. In MDP you do that by calling >>> PCANode.execute(x, 0). >>> Please look at the documentation for more info. >>> >>> May be you could have a read at some introduction to PCA. The >>> Wikipedia article <http://en.wikipedia.org/wiki/Principal_component_analysis>; >>> is unfortunately only a mediocre starting point. >>> Tiziano >>> >>> >>>  >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> mdptoolkitusers mailing list >>> mdptoolkitusers@... >>> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers >> >>  >> Horea Christian >> http://chymera.eu >> >>  >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> mdptoolkitusers mailing list >> mdptoolkitusers@... >> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers  Horea Christian http://chymera.eu 
From: Pietro Berkes <berkes@ga...>  20120713 07:30:40

This line is already computing the pca coefficients for your input, it's equivalent to pca.execute(inp): result = pca(inp) this line computes the pca coefficients for the first 0 components: result_img = pca.execute(inp,0) My understanding is: you want to project your data on the PCA components, and then project it back on the image space. This is done like this: result = pca(inp) reconstruction = pca.inverse(result) P. On Fri, Jul 13, 2012 at 1:48 AM, Horea Christian <h.chr@...> wrote: > HEy again, thanks for the tips. I had come across PCANode.execute in > the docs  and I did try to use it by myself but I kept getting error > messages. Probably improper usage. > > I followed your advice and transposed my matrix so that it now has 80 > rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so > as to avoid memory errors). And I implemented the code as you suggested >  for reference you can find my code here http://paste2.org/p/2071709  > the pca thing is in lines 3238 > > Now, after I call the pca on the transposed matrix I get a resulting > array with 80 rows and 3 columns  seeing as I have 80 time steps I > decided to plot each column as a time series. The result seems to > confirm that this is already the "temporal information" I was looking > for. Now I'll just need the pixel maps of each component. pca.execute > gives me an array with 80 rows and 0 columns :/ so an empty array  I > tried pca._inverse as well, but that won't even run in that context  > am I using pca.execute badly? > > Many thanks, > Christian > > On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >>> Hey there, thanks for the reply  it helped a lot  my little script is >>> a lot faster now. But I still don't understand how I can visualize the >>> activity of my components  I mean I have fed 120 time steps into the >>> PCA  is there no way to visualize my data along those time steps? As I >>> understand my original data should be reconstructible from my output  >>> this doesn't hold If I just get 34 bitmaps as my components. >>> >> >> I think there is a bit of misunderstanding of what PCA means. Your >> time samples are living in a 504**2dimensional space. PCA looks at >> this cloud of points in this huge space and rotates the axes of the >> frame of reference such that one axis is aligned with the direction >> of maximum variance (the first principal component). It follows that >> all other axes (principal components) are then ordered by >> variance. >> >> The way it typically works is that you *train* PCA on some data. By >> doing this you learn the rotation matrix. You then apply the matrix >> to new, unkwown, data (the socalled test set). >> >> You can use this for example to reduce the dimensionality of your data >> while keeping as much information as possible. To do that you can select >> in this huge space only those axes which explain the most variance (say 90%), >> and disregard all the rest. So instead of applying the full rotation >> matrix, you apply only that part corresponding to the first N >> principal components. >> >> All of this is supported and documented in the PCANode. >> >> So, to come to your question, there is no "time course" in the >> principal components: they are "static". What you may be interested >> in is the time course of the test set projected onto, say, the first >> principal component. In MDP you do that by calling >> PCANode.execute(x, 0). >> Please look at the documentation for more info. >> >> May be you could have a read at some introduction to PCA. The >> Wikipedia article <http://en.wikipedia.org/wiki/Principal_component_analysis>; >> is unfortunately only a mediocre starting point. >> Tiziano >> >> >>  >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> mdptoolkitusers mailing list >> mdptoolkitusers@... >> https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers > >  > Horea Christian > http://chymera.eu > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Horea Christian <h.chr@ma...>  20120713 00:48:35

HEy again, thanks for the tips. I had come across PCANode.execute in the docs  and I did try to use it by myself but I kept getting error messages. Probably improper usage. I followed your advice and transposed my matrix so that it now has 80 rows and 63^2 columns (I binned the pixels in my original matrix 8x8 so as to avoid memory errors). And I implemented the code as you suggested  for reference you can find my code here http://paste2.org/p/2071709  the pca thing is in lines 3238 Now, after I call the pca on the transposed matrix I get a resulting array with 80 rows and 3 columns  seeing as I have 80 time steps I decided to plot each column as a time series. The result seems to confirm that this is already the "temporal information" I was looking for. Now I'll just need the pixel maps of each component. pca.execute gives me an array with 80 rows and 0 columns :/ so an empty array  I tried pca._inverse as well, but that won't even run in that context  am I using pca.execute badly? Many thanks, Christian On Mi 11 Jul 2012 18:42:49 CEST, Tiziano Zito wrote: >> Hey there, thanks for the reply  it helped a lot  my little script is >> a lot faster now. But I still don't understand how I can visualize the >> activity of my components  I mean I have fed 120 time steps into the >> PCA  is there no way to visualize my data along those time steps? As I >> understand my original data should be reconstructible from my output  >> this doesn't hold If I just get 34 bitmaps as my components. >> > > I think there is a bit of misunderstanding of what PCA means. Your > time samples are living in a 504**2dimensional space. PCA looks at > this cloud of points in this huge space and rotates the axes of the > frame of reference such that one axis is aligned with the direction > of maximum variance (the first principal component). It follows that > all other axes (principal components) are then ordered by > variance. > > The way it typically works is that you *train* PCA on some data. By > doing this you learn the rotation matrix. You then apply the matrix > to new, unkwown, data (the socalled test set). > > You can use this for example to reduce the dimensionality of your data > while keeping as much information as possible. To do that you can select > in this huge space only those axes which explain the most variance (say 90%), > and disregard all the rest. So instead of applying the full rotation > matrix, you apply only that part corresponding to the first N > principal components. > > All of this is supported and documented in the PCANode. > > So, to come to your question, there is no "time course" in the > principal components: they are "static". What you may be interested > in is the time course of the test set projected onto, say, the first > principal component. In MDP you do that by calling > PCANode.execute(x, 0). > Please look at the documentation for more info. > > May be you could have a read at some introduction to PCA. The > Wikipedia article <http://en.wikipedia.org/wiki/Principal_component_analysis>; > is unfortunately only a mediocre starting point. > Tiziano > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers  Horea Christian http://chymera.eu 
From: Tiziano Zito <tiziano.zito@bc...>  20120711 16:43:02

> Hey there, thanks for the reply  it helped a lot  my little script is > a lot faster now. But I still don't understand how I can visualize the > activity of my components  I mean I have fed 120 time steps into the > PCA  is there no way to visualize my data along those time steps? As I > understand my original data should be reconstructible from my output  > this doesn't hold If I just get 34 bitmaps as my components. > I think there is a bit of misunderstanding of what PCA means. Your time samples are living in a 504**2dimensional space. PCA looks at this cloud of points in this huge space and rotates the axes of the frame of reference such that one axis is aligned with the direction of maximum variance (the first principal component). It follows that all other axes (principal components) are then ordered by variance. The way it typically works is that you *train* PCA on some data. By doing this you learn the rotation matrix. You then apply the matrix to new, unkwown, data (the socalled test set). You can use this for example to reduce the dimensionality of your data while keeping as much information as possible. To do that you can select in this huge space only those axes which explain the most variance (say 90%), and disregard all the rest. So instead of applying the full rotation matrix, you apply only that part corresponding to the first N principal components. All of this is supported and documented in the PCANode. So, to come to your question, there is no "time course" in the principal components: they are "static". What you may be interested in is the time course of the test set projected onto, say, the first principal component. In MDP you do that by calling PCANode.execute(x, 0). Please look at the documentation for more info. May be you could have a read at some introduction to PCA. The Wikipedia article <http://en.wikipedia.org/wiki/Principal_component_analysis>; is unfortunately only a mediocre starting point. Tiziano 
From: Tiziano Zito <tiziano.zito@bc...>  20120711 16:26:52

> Also, I can't run the PCA on a data set with 80 rows and 504^2 columns > > here's what I get: > http://paste2.org/p/2070446 well, PCA is going to try and create a covariance matrix of size 504^2 x 504^2 = 64524128256 elements. if each element is a float64, which is default dtype in numpy, you are trying to create a matrix of roughly 480 GBytes. it seems obvious to me that you get a memory error. ciao, tiziano 
From: Horea Christian <h.chr@ma...>  20120711 15:50:24

Also, I can't run the PCA on a data set with 80 rows and 504^2 columns here's what I get: http://paste2.org/p/2070446 Best Regards, On 05.07.2012 12:11, Tiziano Zito wrote: >> Hi guys, I've asked this question as part of a previous discuccion on >> the mailing list but the discussion kind of stopped afterwards. >> >> I want to use the pca method in matplotlib on a set of "video" frames >> (504^2 pixels over 120 time steps)  I handle my data as an array with >> 504^2 rows and 120 columns  I feed it to the pca function as follows  >> result = mdp.pca(fimg_pca) >> the problem is I get 120 components à 504^2 pixels but no information to >> the time course of the signal generated by the individual components  >> meaning that I can't reconstruct my data from the info I get  how can I >> get the time course info from the pca? > If I understand correctly what you are trying to do, you want to > have your data as a matrix with 120 rows (the time steps) and 504^2 > columns. In MDP observables (variables) live on columns and > observations (i.e. the time samples) live on rows. I would then run > PCA while drastically reducing the number of output components, > because the problem like you formulated it is extremely undetermined. > > You can do that with: > > inp = fimg_pca # where fimg_pca is 120x(504^2) > pca = mdp.nodes.PCANode(output_dim=0.9, svd=True, reduce=True) # keep only 90% of the input variance > result = pca(inp) > > You will then get a result matrix of size 120xN. > If you want to visualize components in input space (i.e. you want > to have 504^2 pixels), look at the columns of the matrix you get > from PCANode.get_recmatrix and at the method PCANode.inverse. > Much more detailed information in PCANode docstring and in the > online tutorial. > > Hope that helps, > Tiziano > > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Horea Christian <h.chr@ma...>  20120710 16:08:07

Hey there, thanks for the reply  it helped a lot  my little script is a lot faster now. But I still don't understand how I can visualize the activity of my components  I mean I have fed 120 time steps into the PCA  is there no way to visualize my data along those time steps? As I understand my original data should be reconstructible from my output  this doesn't hold If I just get 34 bitmaps as my components. Does what I say make any sense? Anyway, I'm eagerly awaiting your reply. On Do 05 Jul 2012 12:11:39 CEST, Tiziano Zito wrote: >> Hi guys, I've asked this question as part of a previous discuccion on >> the mailing list but the discussion kind of stopped afterwards. >> >> I want to use the pca method in matplotlib on a set of "video" frames >> (504^2 pixels over 120 time steps)  I handle my data as an array with >> 504^2 rows and 120 columns  I feed it to the pca function as follows  >> result = mdp.pca(fimg_pca) >> the problem is I get 120 components à 504^2 pixels but no information to >> the time course of the signal generated by the individual components  >> meaning that I can't reconstruct my data from the info I get  how can I >> get the time course info from the pca? > > If I understand correctly what you are trying to do, you want to > have your data as a matrix with 120 rows (the time steps) and 504^2 > columns. In MDP observables (variables) live on columns and > observations (i.e. the time samples) live on rows. I would then run > PCA while drastically reducing the number of output components, > because the problem like you formulated it is extremely undetermined. > > You can do that with: > > inp = fimg_pca # where fimg_pca is 120x(504^2) > pca = mdp.nodes.PCANode(output_dim=0.9, svd=True, reduce=True) # keep only 90% of the input variance > result = pca(inp) > > You will then get a result matrix of size 120xN. > If you want to visualize components in input space (i.e. you want > to have 504^2 pixels), look at the columns of the matrix you get > from PCANode.get_recmatrix and at the method PCANode.inverse. > Much more detailed information in PCANode docstring and in the > online tutorial. > > Hope that helps, > Tiziano > > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mdptoolkitusers mailing list > mdptoolkitusers@... > https://lists.sourceforge.net/lists/listinfo/mdptoolkitusers 
From: Tiziano Zito <tiziano.zito@bc...>  20120705 10:36:51

> Hi guys, I've asked this question as part of a previous discuccion on > the mailing list but the discussion kind of stopped afterwards. > > I want to use the pca method in matplotlib on a set of "video" frames > (504^2 pixels over 120 time steps)  I handle my data as an array with > 504^2 rows and 120 columns  I feed it to the pca function as follows  > result = mdp.pca(fimg_pca) > the problem is I get 120 components à 504^2 pixels but no information to > the time course of the signal generated by the individual components  > meaning that I can't reconstruct my data from the info I get  how can I > get the time course info from the pca? If I understand correctly what you are trying to do, you want to have your data as a matrix with 120 rows (the time steps) and 504^2 columns. In MDP observables (variables) live on columns and observations (i.e. the time samples) live on rows. I would then run PCA while drastically reducing the number of output components, because the problem like you formulated it is extremely undetermined. You can do that with: inp = fimg_pca # where fimg_pca is 120x(504^2) pca = mdp.nodes.PCANode(output_dim=0.9, svd=True, reduce=True) # keep only 90% of the input variance result = pca(inp) You will then get a result matrix of size 120xN. If you want to visualize components in input space (i.e. you want to have 504^2 pixels), look at the columns of the matrix you get from PCANode.get_recmatrix and at the method PCANode.inverse. Much more detailed information in PCANode docstring and in the online tutorial. Hope that helps, Tiziano 
From: Horea Christian <h.chr@ma...>  20120702 23:23:54

Hi guys, I've asked this question as part of a previous discuccion on the mailing list but the discussion kind of stopped afterwards. I want to use the pca method in matplotlib on a set of "video" frames (504^2 pixels over 120 time steps)  I handle my data as an array with 504^2 rows and 120 columns  I feed it to the pca function as follows  result = mdp.pca(fimg_pca) the problem is I get 120 components à 504^2 pixels but no information to the time course of the signal generated by the individual components  meaning that I can't reconstruct my data from the info I get  how can I get the time course info from the pca? Best Reagrds,  Horea Christian http://chymera.eu 