本文整理汇总了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))