Skip to content

incorrect range for sample_size() parameter mapping #58

Description

@simonpcouch
library(tidymodels)
library(agua)

model <- 
  boost_tree(sample_size = tune()) %>%
  set_engine("h2o_gbm") %>%
  set_mode("classification")

set.seed(1)
res <- tune_grid(workflow(class ~ ., model), vfold_cv(sim_classification(1000)))
#> i Creating pre-processing data to finalize unknown parameter: sample_size
#> → A | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 382.
#> There were issues with some computations   A: x1
#> → B | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 137.
#> There were issues with some computations   A: x1→ C | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 176.
#> There were issues with some computations   A: x1→ D | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 336.
#> There were issues with some computations   A: x1→ E | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 257.
#> There were issues with some computations   A: x1→ F | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 105.
#> There were issues with some computations   A: x1→ G | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 491.
#> There were issues with some computations   A: x1→ H | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 427.
#> There were issues with some computations   A: x1→ I | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 217.
#> There were issues with some computations   A: x1→ J | error:   `sample_size` must be a number between 0 and 1 or `NULL`, not the number 292.
#> Warning: All models failed. Run `show_notes(.Last.tune.result)` for more information.

Created on 2025-01-10 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions