Browse Source

[FIX] change _test_val to _test_score

pull/3/head
Gao Enhao 2 years ago
parent
commit
221ca509fe
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      tests/test_models.py

+ 3
- 3
tests/test_models.py View File

@@ -39,7 +39,7 @@ class TestBasicModel(object):
self._test_fit()
self._test_predict()
self._test_predict_proba()
self._test_val()
self._test_score()
self._test_save()
self._test_load()

@@ -58,8 +58,8 @@ class TestBasicModel(object):
assert predict_result.shape == (5, self.num_classes)
assert (0 <= predict_result).all() and (predict_result <= 1).all()

def _test_val(self):
accuracy = self.model.val(X=self.data_X, y=self.data_y)
def _test_score(self):
accuracy = self.model.score(X=self.data_X, y=self.data_y)
assert type(accuracy) == float
assert 0 <= accuracy <= 1



Loading…
Cancel
Save