R/param_predictor_prop.R

Defines functions predictor_prop

Documented in predictor_prop

#' Proportion of predictors
#'
#' The parameter is used in models where a parameter is the proportion of
#' predictor variables.
#'
#' @inheritParams Laplace
#'
#' @details
#' `predictor_prop()` is used in `step_pls()`.
#' @examples
#' predictor_prop()
#' @export
predictor_prop <- function(range = c(0, 1), trans = NULL) {
  new_quant_param(
    type = "double",
    range = range,
    inclusive = c(FALSE, TRUE),
    trans = trans,
    label = c(predictor_prop = "Proportion of Predictors"),
    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.