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