Package dimer :: Module ops
[hide private]
[frames] | no frames]

Module ops

source code

common operations on numpy arrays


Author: odenas

Functions [hide private]
 
fit(x, axis=None, nans=0.0)
scale values of x in the interval [-1, 1]
source code
 
standardize(x, axis=None, nans=0.0)
transform each component of flattened X examples to 0 mean and 1 std So the values of track t at position i are 0 mean and 1 std
source code
Variables [hide private]
  __package__ = 'dimer'
Function Details [hide private]

fit(x, axis=None, nans=0.0)

source code 

scale values of x in the interval [-1, 1]

Parameters:
  • x - ndarray
  • axis - passed to numpy.max and numpy.min
  • nans - if nan values are produced replace them with this
Returns:
scaled values of x

standardize(x, axis=None, nans=0.0)

source code 

transform each component of flattened X examples to 0 mean and 1 std So the values of track t at position i are 0 mean and 1 std

x: a pandas data panel of the form <anchors> X <tracks> X <genome position> return: (the shifted input, the mean for each input component, the sd of each input component) the latter 2 are arrays of shape(<tracks>, <genome position>)