rdkit.ML.MatOps

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

# Source Code for Module rdkit.ML.MatOps

     1  # $Id$
     2  #
     3  #  Copyright (C) 2000-2006  greg Landrum
     4  #
     5  #   @@ All Rights Reserved @@
     6  #  This file is part of the RDKit.
     7  #  The contents are covered by the terms of the BSD license
     8  #  which is included in the file license.txt, found at the root
     9  #  of the RDKit source tree.
    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