def test_zscore(): x = np.array([[1, 1, 3, 3], [4, 4, 6, 6]]) z = utils.zscore(x) npt.assert_equal(x.shape, z.shape) # Default axis is -1 npt.assert_equal(utils.zscore(x), np.array([[-1.0, -1.0, 1.0, 1.0], [-1.0, -1.0, 1.0, 1.0]])) # Test other axis: npt.assert_equal(utils.zscore(x, 0), np.array([[-1.0, -1.0, -1.0, -1.0], [1.0, 1.0, 1.0, 1.0]]))
def test_zscore(): x = np.array([[1, 1, 3, 3], [4, 4, 6, 6]]) z = utils.zscore(x) yield npt.assert_equal, x.shape, z.shape # Default axis is -1 yield npt.assert_equal, utils.zscore(x), np.array([[-1.0, -1.0, 1.0, 1.0], [-1.0, -1.0, 1.0, 1.0]]) # Test other axis: yield npt.assert_equal, utils.zscore(x, 0), np.array([[-1.0, -1.0, -1.0, -1.0], [1.0, 1.0, 1.0, 1.0]])
def test_zscore(): x = np.array([[1, 1, 3, 3], [4, 4, 6, 6]]) z = utils.zscore(x) npt.assert_equal(x.shape, z.shape) #Default axis is -1 npt.assert_equal(utils.zscore(x), np.array([[-1., -1., 1., 1.], [-1., -1., 1., 1.]])) #Test other axis: npt.assert_equal(utils.zscore(x, 0), np.array([[-1., -1., -1., -1.], [1., 1., 1., 1.]]))
def z_score(self): return ts.TimeSeries(tsu.zscore(self.input.data), sampling_rate=self.input.sampling_rate, time_unit = self.input.time_unit)
def z_score(self): return ts.TimeSeries(tsu.zscore(self.input.data), sampling_rate=self.input.sampling_rate, time_unit=self.input.time_unit)
def test_zscore(): x = np.array([[1,2,3],[4,5,6]]) z = utils.zscore(x) npt.assert_equal(x.shape,z.shape)