Giter Site home page Giter Site logo

omicselector-iric's Introduction

IRIC: Integrated R Library for Imbalanced Classification

IRIC is an R library for imbalanced classification, which will bring convenience to users by integrating a wide set of solutions into one library.


Introduction

The current version of IRIC (v1.1) provides a set of 19 approaches for imbalanced classification, in which 8 approaches are new implementations in R. All these approaches can be classified into 3 strategies: data level, algorithm level and ensemble-based strategy. In addition, we provide parallel implementations of Bagging-based solution to improve the efficiency of model building. All approaches in IRIC are presented in the table below.

Strategy Submodule Method
Algorithm level Cost-sensitive learning CSC4.5
Data level Oversampling ADASYN, MWMOTE, Random Oversampling, SMOTE
Undersampling CLUS,Random Undersampling
Hybrid Sampling SmoteENN, SmoteTL, SPIDER
Ensemble-based learning BalanceBagging RBBagging, ROSBagging,RUSBagging,SMOTEBagging
BalanceBoost AdaC2, RUSBoost, SMOTEBoost
Hybrid Ensemble BalanceCascade, EasyEnsemble

Installation

Download the code from GitHub repository before and then apply the techniques. R version >= 3.1.

Examples

SMOTE(Data level), CSC4.5 (Algorithm level) and RBBagging (Ensemble-based level) are presented as examples of IRIC's usage.

SMOTE

#Example of SMOTE
#Load the package caret for data partitioning
library(caret)
#Load data set
load("Korean.RDa")
#Run the script file of SMOTE
source("SMOTE.R")
#data split
sub <- createDataPartition(Korean$Churn,p=0.75,list=FALSE)
trainset <- Korean[sub,]
testset <- Korean[-sub,]
x <- trainset[, -11]
y <- trainset[, 11]
#call the SMOTE
newData<- SMOTE(x, y)

CSC4.5

#Example of CSC4.5 
#load CSC4.5
source("CSC45.R")
library(caret)
#Load data set
load("Korean.RDa")
#Data split
sub <- createDataPartition(Korean$Churn,p=0.75,list=FALSE)
trainset <- Korean[sub,]
testset <- Korean[-sub,]
x <- trainset[, -11]
y <- trainset[, 11]
#training model
model <- CSC45(x, y, pruning = TRUE)
#Prediction
output <- predict (model, x) 

RBBagging

#Example of RBBagging 
#Load the package caret for data partitioning
library (caret) 
#Load data set 
load(”Korean.RDa”) 
#Run the script file of RBBagging 
source(”BalanceBagging.R”)
#Data split
sub <- createDataPartition(Korean$Churn, p=0.75,list=FALSE)
trainset <- Korean[sub,]
testset <- Korean[-sub,]
x <- trainset[, -11]
y <- trainset[, 11]
#call the RBBaging for model training train 
model <- bbagging(x, y, type=”RBBagging", allowParallel=TRUE)
#prediction
output <- predict (model, x)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.