1
2
3
4
5
6
7 """ Matrix operations which may or may not come in handy some day
8
9
10 **NOTE**: the two functions defined here have been moved to ML.Data.Stats
11
12 """
13 from ML.Data import Stats
14
15 FormCovarianceMatrix = Stats.FormCovarianceMatrix
16 PrincipalComponents = Stats.PrincipalComponents
17
18 if __name__ == '__main__':
19 import sys
20 import files
21
22 fileN = sys.argv[1]
23 iV,dV = files.ReadDataFile(fileN)
24 eVals,eVects=PrincipalComponents(iV)
25 print 'eVals: ', eVals
26 print 'eVects:', eVects
27