示例#1
0
 def test_abc_multialpha(self):
     results = boot.ci_abc(self.data,
                           lambda x, y: np.average(x, weights=y),
                           alpha=(0.1, 0.2, 0.8, 0.9))
     np.testing.assert_array_almost_equal(
         results, np.array([0.39472915, 0.51161304, 0.93789723,
                            1.04407254]))
示例#2
0
 def test_abc_multialpha_defaultstat(self):
     results = boot.ci_abc(self.data,alpha=(0.1,0.2,0.8,0.9))
     np.testing.assert_array_almost_equal(results,np.array([ 0.39472915,  0.51161304,  0.93789723,  1.04407254]))
示例#3
0
 def test_abc_multialpha(self):
     results = boot.ci_abc(self.data,lambda x,y: np.average(x,weights=y),alpha=(0.1,0.2,0.8,0.9))
     np.testing.assert_array_almost_equal(results,np.array([ 0.39472915,  0.51161304,  0.93789723,  1.04407254]))
示例#4
0
 def test_abc_simple(self):
     results = boot.ci_abc(self.data,lambda x,y: np.average(x,weights=y))
     np.testing.assert_array_almost_equal(results,np.array([ 0.20982275,  1.20374686]))
示例#5
0
 def test_abc_pandas_series(self):
     results = boot.ci_abc(self.pds,lambda x,y: np.average(x,weights=y))
     np.testing.assert_array_almost_equal(results,np.array([ 0.20982275,  1.20374686]))
示例#6
0
 def test_abc_multialpha_defaultstat(self):
     results = boot.ci_abc(self.data, alpha=(0.1, 0.2, 0.8, 0.9))
     np.testing.assert_array_almost_equal(
         results, np.array([0.39472915, 0.51161304, 0.93789723,
                            1.04407254]))
示例#7
0
 def test_abc_simple(self):
     results = boot.ci_abc(self.data, lambda x, y: np.average(x, weights=y))
     np.testing.assert_array_almost_equal(
         results, np.array([0.20982275, 1.20374686]))
示例#8
0
 def test_abc_pandas_series(self):
     results = boot.ci_abc(self.pds, lambda x, y: np.average(x, weights=y))
     np.testing.assert_array_almost_equal(
         results, np.array([0.20982275, 1.20374686]))