Esempio n. 1
0
 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.SilvermanBW(x).bandwidth, 7),
                      1.3065002)
Esempio n. 2
0
 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.SilvermanBW(x).bandwidth, 7),
                      0.4662301)
Esempio n. 3
0
 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.SilvermanBW(x).bw, 7), 0.7523629)