class_cost {baguette} | R Documentation |
Cost parameter for minority class
Description
Used in bag_treer()
.
Usage
class_cost(range = c(0, 5), trans = NULL)
Arguments
range |
A two-element vector holding the defaults for the smallest and largest possible values, respectively. |
trans |
A |
Details
This parameter reflects the cost of a misclassified sample relative to a baseline cost of 1.0. For example, if the first level of an outcome factor occurred rarely, it might help if this parameter were set to values greater than 1.0. If the second level of the outcome factor is in the minority, values less than 1.0 would cause the model to emphasize the minority class more than the majority class.
Examples
class_cost()
[Package baguette version 1.0.2 Index]