smoteT: Temporal Biased SMOTE

Description Usage Arguments Value Examples

View source: R/smoteT.R

Description

Temporal Biased SMOTE

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
smoteT(
  form,
  data,
  rel = "auto",
  thr.rel = 0.5,
  C.perc = "balance",
  k = 5,
  repl = FALSE,
  dist = "Euclidean",
  p = 2
)

Arguments

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 over-sampling percentage/s to apply to all/each "class" obtained with the relevance threshold. The percentage represents the percentage of replicas that are added. Replicas of the examples are added randomly in each "class". Moreover, different percentages may be provided for each "class". Alternatively, it may be "balance" (the default) or "extreme", cases where the over-sampling percentages are automatically estimated.

k

is the number of neighbours to consider as the pool from where the new generated examples are generated

repl

is it allowed to perform sampling with replacement (bootstrapping).

dist

is the distance measure to be used (defaults to "Euclidean"). Use "HEOM" if there are nominal and numerical predictors

p

is a parameter used when a p-norm is computed

Value

a new training data set resulting from the application of the resampling strategy

Examples

1
2
3
4
5
6
7
library(rewind)
data(temp)
ds <- create.data(temp,10)
C.perc <- list(4,0.5,4)
smoteT <- smoteT(V10 ~ ., ds, C.perc=C.perc)
smoteT.Bal <- smoteT(V10 ~ ., ds, C.perc="balance")
smoteT.Ext <- smoteT(V10 ~ ., ds, C.perc="extreme")

nunompmoniz/rewind documentation built on July 8, 2021, 12:25 a.m.