ML.MatOps

Package ML :: Module MatOps |
[hide private]
[frames] | no frames]

# Source Code for Module ML.MatOps

     1  # $Id: MatOps.py 2 2006-05-06 22:54:39Z glandrum $
     2  #
     3  #  Copyright (C) 2000-2006  greg Landrum
     4  #
     5  #   @@ All Rights Reserved  @@
     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