本文整理汇总了Python中cis.stats.StatsAnalyzer.rel_mean方法的典型用法代码示例。如果您正苦于以下问题:Python StatsAnalyzer.rel_mean方法的具体用法?Python StatsAnalyzer.rel_mean怎么用?Python StatsAnalyzer.rel_mean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cis.stats.StatsAnalyzer
的用法示例。
在下文中一共展示了StatsAnalyzer.rel_mean方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_GIVEN_divide_by_zeros_WHEN_rel_mean_THEN_rel_mean_correct
# 需要导入模块: from cis.stats import StatsAnalyzer [as 别名]
# 或者: from cis.stats.StatsAnalyzer import rel_mean [as 别名]
def test_GIVEN_divide_by_zeros_WHEN_rel_mean_THEN_rel_mean_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_mean()
assert_that(res[0].rel_mean, close_to(-2.3518849206, 1e-5))
示例2: test_GIVEN_missing_vals_WHEN_rel_mean_THEN_rel_mean_correct
# 需要导入模块: from cis.stats import StatsAnalyzer [as 别名]
# 或者: from cis.stats.StatsAnalyzer import rel_mean [as 别名]
def test_GIVEN_missing_vals_WHEN_rel_mean_THEN_rel_mean_correct(self):
stats = StatsAnalyzer(self.missing1, self.missing2)
res = stats.rel_mean()
assert_that(res[0].rel_mean, close_to(0.0715277778, 1e-5))
示例3: test_GIVEN_one_masked_one_nparray_WHEN_rel_mean_THEN_rel_mean_correct
# 需要导入模块: from cis.stats import StatsAnalyzer [as 别名]
# 或者: from cis.stats.StatsAnalyzer import rel_mean [as 别名]
def test_GIVEN_one_masked_one_nparray_WHEN_rel_mean_THEN_rel_mean_correct(self):
stats = StatsAnalyzer(self.data1, self.missing2)
res = stats.rel_mean()
assert_that(res[0].rel_mean, close_to(-2.0087585034, 1e-5))
示例4: test_GIVEN_no_missing_vals_WHEN_rel_mean_THEN_rel_mean_correct
# 需要导入模块: from cis.stats import StatsAnalyzer [as 别名]
# 或者: from cis.stats.StatsAnalyzer import rel_mean [as 别名]
def test_GIVEN_no_missing_vals_WHEN_rel_mean_THEN_rel_mean_correct(self):
stats = StatsAnalyzer(self.data1, self.data2)
res = stats.rel_mean()
assert_that(res[0].rel_mean, close_to(-0.0153531746, 1e-5))