knitr::opts_chunk$set(echo = TRUE, dpi = 120, fig.align = "center", fig.width=5, fig.height=3)

Nonlinear Regression and Classification with Regularized and Pruned Extreme Learning Machines

This is a BETA release and for now it works only for classification problems.

The elmnet function implements a tuning free regularized learner based on Extreme Learning Machines (ELMs) [@huang-2011]. It uses Generalized Cross Validation (GCV) [@golub-1979], a fast and efficient leave-one-out approach, to automatically define the best regularization parameter.

So, elmnet is a fast and easy to use nonlinear learner. Moreover, it uses a softmax function on the output layer to predict calibrated probabilities.

How To Install?

library('devtools')
install_github(repo = "davpinto/elmnet")

Required Packages

The following packages are required to make elmnet work properly. All of them will be automatically instaled when you install elmnet.

Regularization Methods

Pruning Methods

Toy Examples

Classification decision boudary for nonlinear problems.

# Load packages
library('elmnet')
library('caTools')

Two-class example

# Load toy data
data('spirals', package = 'elmnet')
x <- spirals$x
y <- spirals$y

# Split data
set.seed(111)
tr.idx <- caTools::sample.split(y, SplitRatio = 0.7)
x.tr <- x[tr.idx,]
x.te <- x[!tr.idx,]
y.tr <- y[tr.idx]
y.te <- y[!tr.idx]

# Fit ELM model
set.seed(111)
elm.model <- elmnet(x.tr, y.tr, nodes = 300, standardize = TRUE)

# Draw classification decision boudary
elmDecisionBound(elm.model, x.te, y.te, resamp = 150)

Multi-class example

# Load toy data
data('multi_spirals', package = 'elmnet')
x <- multi_spirals$x
y <- multi_spirals$y

# Split data
set.seed(222)
tr.idx <- caTools::sample.split(y, SplitRatio = 0.7)
x.tr <- x[tr.idx,]
x.te <- x[!tr.idx,]
y.tr <- y[tr.idx]
y.te <- y[!tr.idx]

# Fit ELM model
set.seed(222)
elm.model <- elmnet(x.tr, y.tr, nodes = 300, standardize = TRUE)

# Draw classification decision boudary
elmDecisionBound(elm.model, x.te, y.te, resamp = 150)

References



davidnexer/elmnet documentation built on May 15, 2019, 1:15 a.m.