Description Usage Arguments Value Examples
This function creates an object of type imbDis
, an S3 Class.
imbDis objects can be passed into the associated methods as arguments.
Examples of associated methods are auc
, brier
and logLoss
.
1 |
labels |
Vector of ground-truth labels. |
pred |
Vector of predicted probabilities. |
case |
A value present in the |
bins |
Vector of class imbalance frequencies. Values must be larger than 0 and smaller than 1. Default is seq(0.05, 0.5, 0.05). |
A simMetric object - S3 class that contains the input parameters, standardized labels, and sample size.
1 2 3 4 5 6 7 8 9 10 11 | # using the mtcars dataset
LR = glm(vs ~ mpg + hp + wt, data = mtcars, family = "binomial")
preds = predict(LR, mtcars, type = "response") # equiv. to LR$fitted.values
# define the imbDis object
imbD = imbDis(mtcars$vs, preds, 1, seq(0.1, 0.9, 0.1))
# metric results
auc(imbD)
brier(imbD)
logLoss(imbD)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.