Add getNotes test

This commit is contained in:
Ricardo Montañana Gómez 2024-02-09 12:06:19 +01:00
parent 2163e95c4a
commit 03f8b8653b
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE

View File

@ -138,4 +138,15 @@ TEST_CASE("Get num features & num edges", "[BayesNet]")
clf.fit(raw.Xv, raw.yv, raw.featuresv, raw.classNamev, raw.statesv);
REQUIRE(clf.getNumberOfNodes() == 5);
REQUIRE(clf.getNumberOfEdges() == 8);
}
TEST_CASE("BoostAODE feature_select CFS")
{
auto raw = RawDatasets("glass", true);
auto clf = bayesnet::BoostAODE();
clf.setHyperparameters({ {"select_features", "CFS"} });
clf.fit(raw.Xv, raw.yv, raw.featuresv, raw.classNamev, raw.statesv);
REQUIRE(clf.getNumberOfNodes() == 90);
REQUIRE(clf.getNumberOfEdges() == 153);
REQUIRE(clf.getNotes().size() == 1);
REQUIRE(clf.getNotes()[0] == "Used features in initialization: 6 of 9 with CFS");
}