#' @title Get the class weight parameter of a learner.
#'
#' @description
#' Gets the class weight parameter of a learner.
#'
#' @template arg_learner
#' @return [\code{numeric \link{LearnerParam}}]:
#' A numeric parameter object, containing the class weight parameter of the given learner.
#' @family learner
#' @export
getClassWeightParam = function(learner) {
learner = checkLearner(learner, "classif")
assertChoice("class.weights", getLearnerProperties(learner))
learner$par.set$pars[[learner$class.weights.param]]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.