def test_respects_index(self, relevance_table): relevance_table_2 = relevance_table.copy() relevance_table_2.reindex(reversed(relevance_table.index)) result = combine_relevance_tables([relevance_table, relevance_table_2]) assert ([True, False, True, False] == result.relevant).all()
def test_respects_index(self, relevance_table): relevance_table_2 = relevance_table.copy() relevance_table_2.reindex(reversed(relevance_table.index)) result = combine_relevance_tables([relevance_table, relevance_table_2]) assert ([True, False, True, False] == result.relevant).all()
def test_aggregates_p_value(self, relevance_table): relevance_table_2 = relevance_table.copy() relevance_table_2.p_value = [0.2, 0.1, 0.4, 0.3] result = combine_relevance_tables([relevance_table, relevance_table_2]) assert (np.array([0.1, 0.1, 0.3, 0.3]) == result.p_value).all()
def test_disjuncts_relevance(self, relevance_table): relevance_table_2 = relevance_table.copy() relevance_table_2.relevant = [False, True, True, False] result = combine_relevance_tables([relevance_table, relevance_table_2]) assert ([True, True, True, False] == result.relevant).all()
def test_aggregates_p_value(self, relevance_table): relevance_table_2 = relevance_table.copy() relevance_table_2.p_value = [0.2, 0.1, 0.4, 0.3] result = combine_relevance_tables([relevance_table, relevance_table_2]) assert (np.array([0.1, 0.1, 0.3, 0.3]) == result.p_value).all()
def test_disjuncts_relevance(self, relevance_table): relevance_table_2 = relevance_table.copy() relevance_table_2.relevant = [False, True, True, False] result = combine_relevance_tables([relevance_table, relevance_table_2]) assert ([True, True, True, False] == result.relevant).all()