From 19f41ef4a583b80161a1274d23caa0023168aa05 Mon Sep 17 00:00:00 2001 From: Paul Koch Date: Wed, 25 Dec 2024 20:18:13 -0800 Subject: [PATCH] all defaults --- .../libebm/tests/boosting_unusual_inputs.cpp | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/shared/libebm/tests/boosting_unusual_inputs.cpp b/shared/libebm/tests/boosting_unusual_inputs.cpp index d7c8015e7..d6d0a5d87 100644 --- a/shared/libebm/tests/boosting_unusual_inputs.cpp +++ b/shared/libebm/tests/boosting_unusual_inputs.cpp @@ -2127,42 +2127,44 @@ static double RandomizedTesting(const AccelerationFlags acceleration) { double validationMetricIteration = 0.0; for(size_t iRound = 0; iRound < cRounds; ++iRound) { for(IntEbm iTerm = 0; iTerm < static_cast(terms.size()); ++iTerm) { - const IntEbm cRealBins = features[terms[iTerm][0]].CountRealBins(); - const IntEbm cDimensions = terms[iTerm].size(); - - const TermBoostFlags boostFlags = - static_cast(ChooseAny(rng, boostFlagsAny) | ChooseFrom(rng, boostFlagsChoose)); - - const double learningRate = 0.015625; - const IntEbm minSamplesLeaf = TestRand(rng, 5) + 1; - const double minHessian = 0 == TestRand(rng, 5) ? 0.015625 : 0.0; - const double regAlpha = 0 == TestRand(rng, 5) ? 0.015625 : 0.0; - const double regLambda = 0 == TestRand(rng, 5) ? 0.015625 : 0.0; - const double maxDeltaStep = 0 == TestRand(rng, 5) ? 1.0 : 0.0; - const double categoricalSmoothing = 10.0; - const IntEbm maxCategoricalThreshold = 1 + TestRand(rng, cRealBins + 1); - const double categoricalInclusionPercent = 0 == TestRand(rng, 2) ? 0.75 : 1.0; - - // we allow 1 cut more than the number of bins to test excessive leaves. - const IntEbm cLeaves = 1 + TestRand(rng, cRealBins + 1); - const std::vector leaves(cDimensions, cLeaves); - const MonotoneDirection direction = - 0 == TestRand(rng, 5) ? static_cast(TestRand(rng, 2) * 2 - 1) : 0; - const std::vector monotonicity(cDimensions, direction); - - validationMetricIteration = test.Boost(iTerm, - boostFlags, - learningRate, - minSamplesLeaf, - minHessian, - regAlpha, - regLambda, - maxDeltaStep, - categoricalSmoothing, - maxCategoricalThreshold, - categoricalInclusionPercent, - leaves, - monotonicity) + //const IntEbm cRealBins = features[terms[iTerm][0]].CountRealBins(); + //const IntEbm cDimensions = terms[iTerm].size(); + + //const TermBoostFlags boostFlags = + // static_cast(ChooseAny(rng, boostFlagsAny) | ChooseFrom(rng, boostFlagsChoose)); + + //const double learningRate = 0.015625; + //const IntEbm minSamplesLeaf = TestRand(rng, 5) + 1; + //const double minHessian = 0 == TestRand(rng, 5) ? 0.015625 : 0.0; + //const double regAlpha = 0 == TestRand(rng, 5) ? 0.015625 : 0.0; + //const double regLambda = 0 == TestRand(rng, 5) ? 0.015625 : 0.0; + //const double maxDeltaStep = 0 == TestRand(rng, 5) ? 1.0 : 0.0; + //const double categoricalSmoothing = 10.0; + //const IntEbm maxCategoricalThreshold = 1 + TestRand(rng, cRealBins + 1); + //const double categoricalInclusionPercent = 0 == TestRand(rng, 2) ? 0.75 : 1.0; + + //// we allow 1 cut more than the number of bins to test excessive leaves. + //const IntEbm cLeaves = 1 + TestRand(rng, cRealBins + 1); + //const std::vector leaves(cDimensions, cLeaves); + //const MonotoneDirection direction = + // 0 == TestRand(rng, 5) ? static_cast(TestRand(rng, 2) * 2 - 1) : 0; + //const std::vector monotonicity(cDimensions, direction); + + validationMetricIteration = test.Boost(iTerm + // , + //boostFlags, + //learningRate, + //minSamplesLeaf, + //minHessian, + //regAlpha, + //regLambda, + //maxDeltaStep, + //categoricalSmoothing, + //maxCategoricalThreshold, + //categoricalInclusionPercent, + //leaves, + //monotonicity + ) .validationMetric; } } @@ -2179,10 +2181,8 @@ static double RandomizedTesting(const AccelerationFlags acceleration) { } TEST_CASE("stress test, boosting") { - const double expected = 26746562197367.172; - double validationMetricExact = RandomizedTesting(AccelerationFlags_NONE); CHECK(validationMetricExact < 1e300); - double validationMetricSIMD = RandomizedTesting(AccelerationFlags_ALL); + RandomizedTesting(AccelerationFlags_ALL); }