R/param_svm.R

Defines functions svm_margin cost

Documented in cost svm_margin

#' Support vector machine parameters
#'
#' Parameters related to the SVM objective function(s).
#'
#' @inheritParams Laplace
#' @examples
#' cost()
#' svm_margin()
#' @export
cost <- function(range = c(-10, 5), trans = log2_trans()) {
  new_quant_param(
    type = "double",
    range = range,
    inclusive = c(TRUE, TRUE),
    trans = trans,
    label = c(cost = "Cost"),
    finalize = NULL
  )
}

#' @rdname cost
#' @export
svm_margin <- function(range = c(0, .2), trans = NULL) {
  new_quant_param(
    type = "double",
    range = range,
    inclusive = c(TRUE, TRUE),
    trans = trans,
    label = c(margin = "Insensitivity Margin"),
    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 Sept. 10, 2021, 5:06 p.m.