R/param_num_breaks.R

Defines functions num_breaks

Documented in num_breaks

#' Number of cut-points for binning
#'
#' This parameter controls how many bins are used when discretizing predictors.
#'
#' @inheritParams Laplace
#' @examples
#' num_breaks()
#' @export
num_breaks <- function(range = c(2L, 10L), trans = NULL) {
  new_quant_param(
    type = "integer",
    range = range,
    inclusive = c(TRUE, TRUE),
    trans = trans,
    label = c(num_breaks = "Number of Cut Points"),
    finalize = NULL
  )
}
tidymodels/dials documentation built on March 18, 2024, 6:30 a.m.