On Mon, Jun 11, 2012 at 11:03 PM, Justin R <justinbr...@gmail.com> wrote: > operating system Windows 7 > matplotlib version : 1.1.0 > obtained from sourceforge > > the class seems to generate the same Wt matrix for every input. The > every element of the weight matrix is either +sqrt(1/2) or -sqrt(1/2). > > dat1 = 4*np.random.randn(200,1) + 2 > dat2 = dat1*.25 + 1*np.random.randn(200,1) > pcaObj1 = PCA(np.hstack((dat1,dat2))) > print pcaObj1.Wt > > dat3 = 2*np.random.randn(200,1) + 2 > dat4 = dat3*2 + 3*np.random.randn(200,1) > pcaObj2 = PCA(np.hstack((dat1,dat2))) > print pcaObj2.Wt > > The output Y seems to be correct, and the projection function works. > only the Wt matrix seems to be messed up. Am I using this class > incorrectly, or could this be a bug? > thanks, > Justin
Justin, could you post a self-contained script that demonstrates the issue? Where does this PCA function come from? In [1]: from pylab import * In [2]: PCA --------------------------------------------------------------------------- NameError Traceback (most recent call last) C:\Users\phobson\<ipython-input-2-dcf6991f51c0> in <module>() ----> 1 PCA NameError: name 'PCA' is not defined -paul ------------------------------------------------------------------------------ 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/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users