本文整理匯總了Python中cis.stats.StatsAnalyzer.rel_stddev方法的典型用法代碼示例。如果您正苦於以下問題:Python StatsAnalyzer.rel_stddev方法的具體用法?Python StatsAnalyzer.rel_stddev怎麽用?Python StatsAnalyzer.rel_stddev使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cis.stats.StatsAnalyzer
的用法示例。
在下文中一共展示了StatsAnalyzer.rel_stddev方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_GIVEN_divide_by_zeros_WHEN_rel_stddev_THEN_rel_stddev_correct
# 需要導入模塊: from cis.stats import StatsAnalyzer [as 別名]
# 或者: from cis.stats.StatsAnalyzer import rel_stddev [as 別名]
def test_GIVEN_divide_by_zeros_WHEN_rel_stddev_THEN_rel_stddev_correct(self):
# Zeros in the first array cause undefined values in the relative calculations.
data_with_zeros = self.data1
data_with_zeros.data[0][1] = 0
stats = StatsAnalyzer(data_with_zeros, self.missing2)
res = stats.rel_stddev()
assert_that(res[0].rel_stddev, close_to(5.8725242578, 1e-5))
示例2: test_GIVEN_missing_vals_WHEN_rel_stddev_THEN_rel_stddev_correct
# 需要導入模塊: from cis.stats import StatsAnalyzer [as 別名]
# 或者: from cis.stats.StatsAnalyzer import rel_stddev [as 別名]
def test_GIVEN_missing_vals_WHEN_rel_stddev_THEN_rel_stddev_correct(self):
stats = StatsAnalyzer(self.missing1, self.missing2)
res = stats.rel_stddev()
assert_that(res[0].rel_stddev, close_to(0.1930820326, 1e-5))
示例3: test_GIVEN_one_masked_one_nparray_WHEN_rel_stddev_THEN_rel_stddev_correct
# 需要導入模塊: from cis.stats import StatsAnalyzer [as 別名]
# 或者: from cis.stats.StatsAnalyzer import rel_stddev [as 別名]
def test_GIVEN_one_masked_one_nparray_WHEN_rel_stddev_THEN_rel_stddev_correct(self):
stats = StatsAnalyzer(self.data1, self.missing2)
res = stats.rel_stddev()
assert_that(res[0].rel_stddev, close_to(5.4371807462, 1e-5))
示例4: test_GIVEN_no_missing_vals_WHEN_rel_stddev_THEN_rel_stddev_correct
# 需要導入模塊: from cis.stats import StatsAnalyzer [as 別名]
# 或者: from cis.stats.StatsAnalyzer import rel_stddev [as 別名]
def test_GIVEN_no_missing_vals_WHEN_rel_stddev_THEN_rel_stddev_correct(self):
stats = StatsAnalyzer(self.data1, self.data2)
res = stats.rel_stddev()
assert_that(res[0].rel_stddev, close_to(0.1097392069, 1e-5))