Enable XGBoost test
This commit is contained in:
@@ -105,13 +105,13 @@ TEST_CASE("Predict with non_discretized dataset and comparing to predict_proba",
|
|||||||
auto accuracy = right / static_cast<float>(predictions.size(0));
|
auto accuracy = right / static_cast<float>(predictions.size(0));
|
||||||
REQUIRE(accuracy == Catch::Approx(1.0f).epsilon(raw.epsilon));
|
REQUIRE(accuracy == Catch::Approx(1.0f).epsilon(raw.epsilon));
|
||||||
}
|
}
|
||||||
// TEST_CASE("XGBoost", "[PyClassifiers]")
|
TEST_CASE("XGBoost", "[PyClassifiers]")
|
||||||
// {
|
{
|
||||||
// auto raw = RawDatasets("iris", true);
|
auto raw = RawDatasets("iris", true);
|
||||||
// auto clf = pywrap::XGBoost();
|
auto clf = pywrap::XGBoost();
|
||||||
// clf.fit(raw.Xt, raw.yt, raw.featurest, raw.classNamet, raw.statest);
|
clf.fit(raw.Xt, raw.yt, raw.featurest, raw.classNamet, raw.statest);
|
||||||
// nlohmann::json hyperparameters = { "n_jobs=1" };
|
nlohmann::json hyperparameters = { "n_jobs=1" };
|
||||||
// clf.setHyperparameters(hyperparameters);
|
clf.setHyperparameters(hyperparameters);
|
||||||
// auto score = clf.score(raw.Xt, raw.yt);
|
auto score = clf.score(raw.Xt, raw.yt);
|
||||||
// REQUIRE(score == Catch::Approx(0.98).epsilon(raw.epsilon));
|
REQUIRE(score == Catch::Approx(0.98).epsilon(raw.epsilon));
|
||||||
// }
|
}
|
Reference in New Issue
Block a user