LMDRT: Logarithm Marginal Density Ratios Transformation

Description Usage Arguments Details Value Source Examples

View source: R/LMDRT.R

Description

Features augmentation via logarithm marginal density ratios transformation in train and test set.

Usage

1
LMDRT(Train, Test, yname, levels, yflag)

Arguments

Train

a train set that needs to be transformed.

Test

a train set that needs to be transformed.

yname

a train set that needs to be transformed.

levels

results in result-column.

yflag

a flag that describes whether there is result-column in the test set.

Details

First, split train set into 2 part. Then, apply the first part on kernel estimation of class conditional densities and use the result of kernel density estimation to transform therefore augment features in train and test set.

Value

The function gives transformed datasets from train and test set.

Source

For transformation, based on Wang H , Gu J , Wang S . An effective intrusion detection framework based on SVM with feature augmentation[J]. Knowledge-Based Systems, 2017, 136(Nov.15):130-139. Fan J , Feng Y , Jiang J , et al. Feature Augmentation via Nonparametrics and Selection (FANS) in High Dimensional Classification[J]. Journal of the American Statal Association, 2016, 111(513):275.

Examples

1
2
3
4
intest = subnum(rawdata, k = 10)[[1]]
test = rawdata[intest,]
training = rawdata[-intest,]
LMDRT(training, test, 'class', c('normal', 'attack'), T)

ShanLu92/FeaAug documentation built on Jan. 31, 2021, 7:21 p.m.