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 = log10_trans()) {
  new_quant_param(
    type = "double",
    range = range,
    inclusive = c(TRUE, TRUE),
    trans = trans,
    label = c(weight = "Weight"),
    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.