R/param_weight_scheme.R

Defines functions weight_scheme

Documented in weight_scheme

#' Term frequency weighting methods
#'
#' @param values A character string of possible values. See `values_weight_scheme`
#'  in examples below.
#'
#' @details
#' This parameter is used in `textrecipes::step_tf()`.
#' @examples
#' values_weight_scheme
#' weight_scheme()
#' @export
weight_scheme <- function(values = values_weight_scheme) {
  new_qual_param(
    type = "character",
    values = values,
    label = c(weight_scheme = "Term Frequency Weight Method"),
    finalize = NULL
  )
}

#' @rdname weight_scheme
#' @export
values_weight_scheme <- c(
  "raw count",
  "binary",
  "term frequency",
  "log normalization",
  "double normalization"
)

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.