Begin with kDB classifier

This commit is contained in:
2022-11-14 14:03:45 +01:00
parent 6b2e60eba0
commit 1545ca62cf
4 changed files with 168 additions and 133 deletions

View File

@@ -69,8 +69,7 @@ def test_TAN_classifier(data):
X = data[0]
y = data[1]
y_pred = clf.predict(X)
y = y.reshape(-1, 1)
assert y_pred.shape == (X.shape[0], 1)
assert y_pred.shape == (X.shape[0],)
assert sum(y == y_pred) == 147
@@ -103,8 +102,7 @@ def test_TAN_classifier_simple_init(data):
X = data[0]
y = data[1]
y_pred = clf.predict(X)
y = y.reshape(-1, 1)
assert y_pred.shape == (X.shape[0], 1)
assert y_pred.shape == (X.shape[0],)
assert sum(y == y_pred) == 147

View File

@@ -7,4 +7,7 @@ from bayesclass import TAN
@pytest.mark.parametrize("estimator", [TAN()])
def test_all_estimators(estimator):
return check_estimator(estimator)
i = 0
for estimator, test in check_estimator(estimator, generate_only=True):
print(i := i + 1, test, "classes_")
# test(estimator)