예제 #1
0
def test_whitener_lowrank():
  '''Test whitener with low-rank covariance matrix'''
  Sig = np.eye(10)
  Sig[0, 0] = 0
  W = sf.whitener(Sig)
  np.testing.assert_almost_equal(reduce(np.dot, [W.T, Sig, W]), Sig)
예제 #2
0
def test_whitener():
    Sig = np.cov(np.random.rand(10, 100))
    W = sf.whitener(Sig)
    np.testing.assert_almost_equal(reduce(np.dot, [W.T, Sig, W]), np.eye(10))
예제 #3
0
def test_whitener():
  Sig = np.cov(np.random.rand(10, 100))
  W = sf.whitener(Sig)
  np.testing.assert_almost_equal(reduce(np.dot, [W.T, Sig, W]), np.eye(10))
예제 #4
0
def test_whitener_lowrank():
    """Test whitener with low-rank covariance matrix"""
    Sig = np.eye(10)
    Sig[0, 0] = 0
    W = sf.whitener(Sig)
    np.testing.assert_almost_equal(reduce(np.dot, [W.T, Sig, W]), Sig)