R/param_weight.R

Defines functions weight

Documented in weight

#' Parameter for `"double normalization"` when creating token counts
#'
#' Used in `textrecipes::step_tf()`.
#'
#' @inheritParams Laplace
#' @examples
#' weight()
#' @export
weight <- function(range = c(-10, 0), trans = transform_log10()) {
  new_quant_param(
    type = "double",
    range = range,
    inclusive = c(TRUE, TRUE),
    trans = trans,
    label = c(weight = "Weight"),
    finalize = NULL
  )
}
tidymodels/dials documentation built on March 18, 2024, 6:30 a.m.