From b8a9fb1022d65bdf908a926e0857bf05d8c40a4c Mon Sep 17 00:00:00 2001 From: Paul Koch Date: Wed, 25 Dec 2024 10:34:35 -0800 Subject: [PATCH] remove lossguide --- .../libebm/tests/boosting_unusual_inputs.cpp | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/shared/libebm/tests/boosting_unusual_inputs.cpp b/shared/libebm/tests/boosting_unusual_inputs.cpp index fc735dc47..090464301 100644 --- a/shared/libebm/tests/boosting_unusual_inputs.cpp +++ b/shared/libebm/tests/boosting_unusual_inputs.cpp @@ -2031,35 +2031,35 @@ TEST_CASE("purified boosting and impure boosting different for impure input, reg } } -TEST_CASE("lossguide, boosting, regression") { - TestBoost test = TestBoost(Task_Regression, - {FeatureTest(5, true, true, false), FeatureTest(5, true, true, true)}, - {{0}, {1}}, - { - TestSample({0, 0}, 21), - TestSample({1, 1}, 10), - TestSample({2, 2}, 20), - TestSample({3, 3}, 30), - TestSample({4, 4}, 29), - }, - {TestSample({0, 0}, 20.5)}); - - // boost continuous missing lossguide - double validationMetric = test.Boost(0, TermBoostFlags_Default).validationMetric; - CHECK_APPROX(validationMetric, 411.88702500000005); - - // boost nominal missing lossguide - validationMetric = test.Boost(1, TermBoostFlags_Default).validationMetric; - CHECK_APPROX(validationMetric, 403.69047320250002); - - // boost continuous missing lossguide - validationMetric = test.Boost(0, TermBoostFlags_Default).validationMetric; - CHECK_APPROX(validationMetric, 395.65703278577030); - - double termScore; - termScore = test.GetCurrentTermScore(0, {0}, 0); - CHECK_APPROX(termScore, 0.40592050000000002); -} +//TEST_CASE("lossguide, boosting, regression") { +// TestBoost test = TestBoost(Task_Regression, +// {FeatureTest(5, true, true, false), FeatureTest(5, true, true, true)}, +// {{0}, {1}}, +// { +// TestSample({0, 0}, 21), +// TestSample({1, 1}, 10), +// TestSample({2, 2}, 20), +// TestSample({3, 3}, 30), +// TestSample({4, 4}, 29), +// }, +// {TestSample({0, 0}, 20.5)}); +// +// // boost continuous missing lossguide +// double validationMetric = test.Boost(0, TermBoostFlags_Default).validationMetric; +// CHECK_APPROX(validationMetric, 411.88702500000005); +// +// // boost nominal missing lossguide +// validationMetric = test.Boost(1, TermBoostFlags_Default).validationMetric; +// CHECK_APPROX(validationMetric, 403.69047320250002); +// +// // boost continuous missing lossguide +// validationMetric = test.Boost(0, TermBoostFlags_Default).validationMetric; +// CHECK_APPROX(validationMetric, 395.65703278577030); +// +// double termScore; +// termScore = test.GetCurrentTermScore(0, {0}, 0); +// CHECK_APPROX(termScore, 0.40592050000000002); +//} static double RandomizedTesting(const AccelerationFlags acceleration) { const IntEbm cTrainSamples = 211; // have some non-SIMD residuals @@ -2174,12 +2174,12 @@ static double RandomizedTesting(const AccelerationFlags acceleration) { return validationMetric; } -//TEST_CASE("stress test, boosting") { -// const double expected = 26746562197367.172; -// -// double validationMetricExact = RandomizedTesting(AccelerationFlags_NONE); -// CHECK(validationMetricExact == expected); -// -// double validationMetricSIMD = RandomizedTesting(AccelerationFlags_ALL); -// CHECK_APPROX_TOLERANCE(validationMetricSIMD, expected, 1e-2); -//} +TEST_CASE("stress test, boosting") { + const double expected = 26746562197367.172; + + double validationMetricExact = RandomizedTesting(AccelerationFlags_NONE); + CHECK(validationMetricExact == expected); + + double validationMetricSIMD = RandomizedTesting(AccelerationFlags_ALL); + CHECK_APPROX_TOLERANCE(validationMetricSIMD, expected, 1e-2); +}