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
  )
}

Try the dials package in your browser

Any scripts or data that you put into this service are public.

dials documentation built on April 3, 2023, 5:43 p.m.