powered by
Calculate weights for class imbalance
weight(y)
Vector of weights
Factor or character response vector. If a character vector is supplied it is coerced into a factor. Unused levels are dropped.