Currently, varying_args.step() removes any argument where the value is NULL. I'm not sure this is the right behavior. Consider this example:
library(parsnip)
library(recipes)
x <- recipe(Species ~ ., data = iris) %>%
step_bs(Sepal.Length, degree = varying())
varying_args(x)
#> # A tibble: 2 x 4
#> name varying id type
#> <chr> <lgl> <chr> <chr>
#> 1 degree TRUE step_bs step
#> 2 options FALSE step_bs step
Created on 2019-01-24 by the reprex package (v0.2.1.9000)
In this case deg_free is a parameter that could validly have been tuned over, but it was not shown here because its default value is NULL (and nulls are removed). On the other hand, options has a default of list(), so it shows up here.
I think we should not remove any NULL values, so we can print the full set of potential tuning parameters.
Currently,
varying_args.step()removes any argument where the value isNULL. I'm not sure this is the right behavior. Consider this example:Created on 2019-01-24 by the reprex package (v0.2.1.9000)
In this case
deg_freeis a parameter that could validly have been tuned over, but it was not shown here because its default value isNULL(and nulls are removed). On the other hand,optionshas a default oflist(), so it shows up here.I think we should not remove any
NULLvalues, so we can print the full set of potential tuning parameters.