knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
This package aims to improve the accuracy of classification models by transfroming the original features into new features that are of better quality. We will updata the package when more methods become available.
In version 0.1.0, this can be accomplished by the function "LMDRT". The function "LMDRT" implements the logarithm marginal density ratios transformation to reach the goal, which greatly improves the detection capability of an SVM-based detection model in NSL-KDD dataset. Other classifiers can also be employed to replace SVM.
You can instll the package from Github:
#library(devtools) #install_github('shanlu92/FeaAug')
Or you can download the package from Github and run the following:
#install.packages('path/FeaAug_0.1.0.tar.gz', repos = NULL, type = 'source')
This is a simple example which shows you how to apply the function "LMDRT".
library(e1071) library(parallel) library(FeaAug) intest = subnum(rawdata, k = 10)[[1]] #rawdata is the NSL-KDD dataset. test = rawdata[intest,] training = rawdata[-intest,] data = LMDRT(training, test, 'class', c('normal', 'attack'), T) traindata = data$traindata testdata = data$testdata head(traindata)[,1:6] # the first six rows and six columns of the transformed train dataset head(testdata)[,1:6] # the first six rows and six columns of the transformed test dataset
The transformed data are of better quality than the original data. Next, the transformed data can then be put into any classifier such as SVM. More details can be found in example.R.
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.
For this version of package (FeaAug_0.1.0), the authors are:
Jie Gu, Yue Zheng Ouyang, and Shan Lu (shan.lu@cufe.edu.cn).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.