def test_bandwidth_2(self): xy = np.array([(1, 5), (3, 3), (2, 4), (1, 10), (4, 9)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.BowmanBW(x).bandwidth, 7), 1.4223373)
def test_bandwidth_3(self): xy = np.array([(3, 5), (2, 4), (3, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.BowmanBW(x).bandwidth, 7), 0.6052020)
def test_1(self): xy = np.array([(1, 5), (3, 3), (2, 4)]) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.BowmanBW(x).bw, 7), 0.7881495)