Over sampling for time series classification.
OSTSC implements oversampling for univariate, multimodal, time series classification. It has been tested in the Windows & Linux system.
library(devtools)
install_github("lweicdsor/OSTSC")
library(OSTSC)
Here is a simple example showing package usage. A tutorial with more complex examples is provided in the vignette. (https://github.com/lweicdsor/OSTSC/blob/master/inst/doc/Over_Sampling_for_Time_Series_Classification.pdf)
data(Dataset_Synthetic_Control)
train.label <- Dataset_Synthetic_Control$train.y
train.sample <- Dataset_Synthetic_Control$train.x
dim(train.sample)
dim(train.label)
table(train.label)
MyData <- OSTSC(train.sample, train.label)
x <- MyData$sample
y <- MyData$label
table(y)