Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

* `prop_terms()` is a new parameter object used for recipes that do supervised feature selection (#395).

* `upper_limit()` and `lower_limit()` now have ranges that are inclusive of the endpoints, unless the endpoint is infinite (#396).

* `batch_size()` now has a specific default parameter range instead of an unknown default range. `get_batch_sizes()` is deprecated (#398).


# dials 1.4.1

* Two new parameters, `cal_method_class()` and `cal_method_reg(),` to control which method is used to calibrate model predictions (#383).
Expand Down
10 changes: 8 additions & 2 deletions R/param_range_limits.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
#' @rdname range_limits
#' @export
lower_limit <- function(range = c(-Inf, Inf), trans = NULL) {
inclusive <- c(TRUE, TRUE)
inclusive[is.infinite(range)] <- FALSE

new_quant_param(
type = "double",
range = range,
inclusive = c(TRUE, FALSE),
inclusive = inclusive,
trans = trans,
label = c(lower_limit = "Lower Limit"),
finalize = NULL
Expand All @@ -26,10 +29,13 @@ lower_limit <- function(range = c(-Inf, Inf), trans = NULL) {
#' @rdname range_limits
#' @export
upper_limit <- function(range = c(-Inf, Inf), trans = NULL) {
inclusive <- c(TRUE, TRUE)
inclusive[is.infinite(range)] <- FALSE

new_quant_param(
type = "double",
range = range,
inclusive = c(FALSE, TRUE),
inclusive = inclusive,
trans = trans,
label = c(upper_limit = "Upper Limit"),
finalize = NULL
Expand Down
Loading