def test_iccs5(): """ Test hcs on two correlated bits """ d = D(['00', '01', '10', '11'], [0.4, 0.1, 0.1, 0.4]) red = h_cs(d, ((0, ), (1, ))) assert red == pytest.approx(0.542457524090110)
def test_iccs3(): """ Test hcs on two redundant bits. """ d = D(['00', '11'], [0.5] * 2) red = h_cs(d, ((0, ), (1, ))) assert red == pytest.approx(1)
def test_iccs4(): """ Test hcs on two independent bits """ d = D(['00', '01', '10', '11'], [0.25] * 4) red = h_cs(d, ((0, ), (1, ))) assert red == pytest.approx(0)
def test_iccs1(): """ Test hcs on redundant distribution. """ d = bivariates['redundant'] red = h_cs(d, ((0, ), (1, )), (2, )) assert red == pytest.approx(1)
def test_iccs2(): """ Test hcs on synergistic distribution. """ d = bivariates['synergy'] red = h_cs(d, ((0, ), (1, )), (2, )) assert red == pytest.approx(0)
def test_iccs6(): """ Test hcs on triadic (required maxent) """ triadic = D(['000', '111', '022', '133', '202', '313', '220', '331'], [1/8.0]*8) red = h_cs(triadic, ((0,), (1,), (2,))) assert red == pytest.approx(1)
def test_iccs6(): """ Test hcs on triadic (required maxent) """ triadic = D(['000', '111','022','133','202','313','220','331'], [1/8.0]*8) red = h_cs(triadic, ((0,), (1,), (2,))) assert red == pytest.approx(1)
def test_iccs5(): """ Test hcs on two correlated bits """ d = D(['00', '01', '10', '11'], [0.4, 0.1, 0.1, 0.4]) red = h_cs(d, ((0,), (1,))) assert red == pytest.approx(0.542457524090110)
def test_iccs4(): """ Test hcs on two independent bits """ d = D(['00', '01', '10', '11'], [0.25]*4) red = h_cs(d, ((0,), (1,))) assert red == pytest.approx(0)
def test_iccs3(): """ Test hcs on two redundant bits. """ d = D(['00', '11'], [0.5]*2) red = h_cs(d, ((0,), (1,))) assert red == pytest.approx(1)
def test_iccs2(): """ Test hcs on synergistic distribution. """ d = bivariates['synergy'] red = h_cs(d, ((0,), (1,)), (2,)) assert red == pytest.approx(0)
def test_iccs1(): """ Test hcs on redundant distribution. """ d = bivariates['redundant'] red = h_cs(d, ((0,), (1,)), (2,)) assert red == pytest.approx(1)