Esempio n. 1
0
 def test_stuart_multiple_agreements(self):
     y_pred1 = ['a', 'b', 'c', 'b', 'a', 'd']
     y_pred2 = ['b', 'a', 'c', 'b', 'a', 'd']
     with pytest.raises(InvalidArgumentError):
         stuart_maxwell_test(y_pred1, y_pred2)
Esempio n. 2
0
 def test_stuart_invalid(self):
     y_pred1 = ['a', 'b', 'c', 'd']
     y_pred2 = ['a', 'b', 'c']
     with pytest.raises(InvalidArgumentError):
         stuart_maxwell_test(y_pred1, y_pred2)
Esempio n. 3
0
 def test_stuart_one_agreement(self):
     y_pred1 = ['a', 'b', 'c', 'b', 'a', 'c']
     y_pred2 = ['b', 'b', 'c', 'c', 'a', 'c']
     assert pytest.approx(stuart_maxwell_test(y_pred1, y_pred2),
                          1e-4) == 0.3679