Description Usage Arguments Value Examples
Temporal-Biased Random Undersampling
1 2 3 4 5 6 7 8 | randUnderT(
form,
data,
rel = "auto",
thr.rel = 0.5,
C.perc = "balance",
repl = FALSE
)
|
form |
a model formula |
data |
the original training set (with the unbalanced distribution) |
rel |
is the relevance determined automatically (default: "auto") or provided by the user through a matrix. See examples. |
thr.rel |
is the relevance threshold above which a case is considered as an extreme value |
C.perc |
is a list containing the under-sampling percentage/s to apply to all/each "class" obtained with the relevance threshold. This percentage represents the percentage of examples that is maintained in each "class". Examples are randomly removed in each "class". Moreover, different percentages may be provided for each "class". Alternatively, it may be "balance" or "extreme", cases where the under-sampling percentages are automatically estimated. |
repl |
is it allowed to perform sampling with replacement (bootstrapping) |
a new training data set resulting from the application of the resampling strategy
1 2 3 4 5 6 7 | library(rewind)
data(temp)
ds <- create.data(temp,10)
C.perc <- list(0.5)
underT <- randUnderT(V10 ~ ., ds, C.perc=C.perc)
underT.Bal <- randUnderT(V10 ~ ., ds, C.perc="balance")
underT.Ext <- randUnderT(V10 ~ ., ds, C.perc="extreme")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.