From 457199b7c9b4baf3393e232ee344d20f5c19875c Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Mon, 2 Feb 2026 14:23:24 +0000 Subject: [PATCH] lower bound of a parameter range now can't exceed the upper bound --- tests/testthat/_snaps/tune_bayes.md | 2 +- tests/testthat/test-tune_bayes.R | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/testthat/_snaps/tune_bayes.md b/tests/testthat/_snaps/tune_bayes.md index 41ae9e42d..ed936a40b 100644 --- a/tests/testthat/_snaps/tune_bayes.md +++ b/tests/testthat/_snaps/tune_bayes.md @@ -443,7 +443,7 @@ res_fail <- tune_bayes(mod, Sale_Price ~ Neighborhood + Gr_Liv_Area + Year_Built + Bldg_Type + Latitude + Longitude, resamples = folds, initial = 5, metrics = yardstick::metric_set(rsq), param_info = parameters(dials::cost_complexity( - c(0.5, 0)))) + c(0, 0.5)))) Message > A | warning: A correlation computation is required, but `estimate` is constant and has 0 standard deviation, resulting in a divide by 0 error. `NA` will be returned. ! All of the rsq estimates were missing. The Gaussian process model cannot be diff --git a/tests/testthat/test-tune_bayes.R b/tests/testthat/test-tune_bayes.R index 893af2de5..c8df715fb 100644 --- a/tests/testthat/test-tune_bayes.R +++ b/tests/testthat/test-tune_bayes.R @@ -564,11 +564,11 @@ test_that("missing performance values", { tune_bayes( Sale_Price ~ Neighborhood + - Gr_Liv_Area + - Year_Built + - Bldg_Type + - Latitude + - Longitude, + Gr_Liv_Area + + Year_Built + + Bldg_Type + + Latitude + + Longitude, resamples = folds, initial = 3, metrics = yardstick::metric_set(rsq), @@ -583,15 +583,15 @@ test_that("missing performance values", { tune_bayes( Sale_Price ~ Neighborhood + - Gr_Liv_Area + - Year_Built + - Bldg_Type + - Latitude + - Longitude, + Gr_Liv_Area + + Year_Built + + Bldg_Type + + Latitude + + Longitude, resamples = folds, initial = 5, metrics = yardstick::metric_set(rsq), - param_info = parameters(dials::cost_complexity(c(0.5, 0))) + param_info = parameters(dials::cost_complexity(c(0, 0.5))) ) }) })