Esempio n. 1
0
 def test_const_vec(self):
     tf.standardize(np.array([2, 2, 2]))
Esempio n. 2
0
 def test_inf(self):
     tf.standardize(np.array([1, -1, np.inf, -2, 3, -3]))
Esempio n. 3
0
 def test_const_mat(self):
     tf.standardize(np.ones((6, 4)))
Esempio n. 4
0
 def test_vec(self):
     data_std = tf.standardize(np.array([1, -1, 2, -2, 3, -3]))
     assert np.isclose(np.mean(data_std), 0)
     assert np.isclose(np.std(data_std), 1)
Esempio n. 5
0
 def test_missing(self):
     tf.standardize(np.array([1, -1, np.nan, -2, 3, -3]))
Esempio n. 6
0
 def test_const_vec(self):
     tf.standardize(np.array([2, 2, 2]))
Esempio n. 7
0
    def test_clean_data(self):
        data_std = tf.standardize(DATA1)

        assert np.allclose(np.mean(data_std, 0), np.zeros(DATA1.shape[1]))
        assert np.allclose(np.std(data_std, 0), np.ones(DATA1.shape[1]))
Esempio n. 8
0
 def test_const_mat(self):
     tf.standardize(np.ones((6, 4)))
Esempio n. 9
0
 def test_inf(self):
     tf.standardize(np.array([1, -1, np.inf, -2, 3, -3]))
Esempio n. 10
0
 def test_missing(self):
     tf.standardize(np.array([1, -1, np.nan, -2, 3, -3]))
Esempio n. 11
0
 def test_vec(self):
     data_std = tf.standardize(np.array([1, -1, 2, -2, 3, -3]))
     assert np.isclose(np.mean(data_std), 0)
     assert np.isclose(np.std(data_std), 1)
Esempio n. 12
0
    def test_clean_data(self):
        data_std = tf.standardize(DATA1)

        assert np.allclose(np.mean(data_std, 0), np.zeros(DATA1.shape[1]))
        assert np.allclose(np.std(data_std, 0), np.ones(DATA1.shape[1]))