コード例 #1
0
 def test_invalid_model_member(self):
     with pytest.raises(Exception):
         fhmc.compare_measures({
             0: self.X,
             1: self.X
         }, {
             0: self.y,
             1: self.y
         }, {
             0: self.prtc_attr,
             1: None
         }, self.model_dict)
コード例 #2
0
 def test_invalid_X_member(self):
     with pytest.raises(Exception):
         fhmc.compare_measures({
             0: self.X,
             1: self.X
         }, {
             0: self.y,
             1: self.y
         }, {
             0: self.prtc_attr,
             1: self.prtc_attr
         }, {
             0: self.y,
             1: self.y
         })
コード例 #3
0
 def test_incompatible_iterables_1(self):
     with pytest.raises(Exception):
         fhmc.compare_measures([self.X, self.X], [self.y, self.y],
                               [self.prtc_attr, self.prtc_attr],
                               self.model_dict)
コード例 #4
0
 def test_compare_with_protected_attributes(self):
     result = fhmc.compare_measures(
         [self.X, self.X], [self.y, self.y],
         [self.prtc_attr, self.prtc_attr],
         [self.model_dict[0], self.model_dict[1]])
     assert result is not None
コード例 #5
0
 def test_compare_with_model_as_none(self):
     result = fhmc.compare_measures(self.X, self.y, self.prtc_attr, None)
     assert result is not None
コード例 #6
0
 def test_compare_with_model_as_array(self):
     result = fhmc.compare_measures(self.X, self.y, self.prtc_attr,
                                    [self.model_dict[0]])
     assert result is not None
コード例 #7
0
 def test_compare_valid_inputs(self):
     result = fhmc.compare_measures(self.X, self.y, self.prtc_attr,
                                    self.model_dict)
     assert result is not None