From 6a76e04c3f588f19e9cef4e7540fdddf8ca39088 Mon Sep 17 00:00:00 2001 From: Paul Koch Date: Mon, 23 Dec 2024 13:57:38 -0800 Subject: [PATCH] fix inconsistent results in ARM exact tests by removing purification from tests --- shared/libebm/tests/boosting_unusual_inputs.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/shared/libebm/tests/boosting_unusual_inputs.cpp b/shared/libebm/tests/boosting_unusual_inputs.cpp index e2c2dc455..1631bc188 100644 --- a/shared/libebm/tests/boosting_unusual_inputs.cpp +++ b/shared/libebm/tests/boosting_unusual_inputs.cpp @@ -2088,9 +2088,11 @@ TEST_CASE("stress test, boosting") { // terms.push_back({0, 1, 2, 3}); // TODO: enable when fast enough } const size_t cRounds = 200; - std::vector boostFlagsAny{TermBoostFlags_PurifyGain, + std::vector boostFlagsAny{// TermBoostFlags_PurifyGain, TermBoostFlags_DisableNewtonGain, TermBoostFlags_DisableCategorical, + // TermBoostFlags_PurifyUpdate, + // TermBoostFlags_GradientSums, // does not return a metric TermBoostFlags_DisableNewtonUpdate, TermBoostFlags_RandomSplits}; std::vector boostFlagsChoose{TermBoostFlags_Default, @@ -2099,10 +2101,10 @@ TEST_CASE("stress test, boosting") { TermBoostFlags_MissingSeparate, TermBoostFlags_MissingDrop}; - double validationMetric = 0.0; + double validationMetric = 1.0; for(IntEbm classesCount = Task_Regression; classesCount < 5; ++classesCount) { - if(classesCount != Task_Regression && classesCount < 2) { + if(classesCount != Task_Regression && classesCount < 1) { continue; } const auto train = MakeRandomDataset(rng, classesCount, cTrainSamples, features); @@ -2159,9 +2161,13 @@ TEST_CASE("stress test, boosting") { .validationMetric; } } - validationMetric += validationMetricIteration; + if(classesCount == 1) { + CHECK(-std::numeric_limits::infinity() == validationMetric); + } else { + validationMetric *= validationMetricIteration; + } } } - CHECK(validationMetric == 42031.143270308334); + CHECK(validationMetric == 62013566170252.117); }