Move tests library to tests/lib
Add PBC4cip classifier
This commit is contained in:
@@ -135,4 +135,14 @@ TEST_CASE("XGBoost", "[PyClassifiers]")
|
||||
// // REQUIRE(sum == Catch::Approx(1.0).epsilon(raw.epsilon));
|
||||
// }
|
||||
// std::cout << predict << std::endl;
|
||||
// }
|
||||
// }
|
||||
TEST_CASE("PBC4cip", "[PyClassifiers]")
|
||||
{
|
||||
auto raw = RawDatasets("iris", true);
|
||||
auto clf = pywrap::PBC4cip();
|
||||
clf.fit(raw.Xt, raw.yt, raw.featurest, raw.classNamet, raw.statest);
|
||||
nlohmann::json hyperparameters = { };
|
||||
clf.setHyperparameters(hyperparameters);
|
||||
auto score = clf.score(raw.Xt, raw.yt);
|
||||
REQUIRE(score == Catch::Approx(0.98).epsilon(raw.epsilon));
|
||||
}
|
Reference in New Issue
Block a user