pca.elm_train {ICompELM}R Documentation

Training of PCA based ELM model for time series forecasting

Description

An Extreme Learning Machine is trained by utilizing the concept of Principal Component Analysis.

Usage

pca.elm_train(
  train_data,
  lags,
  comps = lags,
  center = TRUE,
  scale = TRUE,
  bias = TRUE,
  actfun = "sig"
)

Arguments

train_data

A univariate time series data.

lags

Number of lags to be considered.

comps

Number of independent components to be considered. Corresponds to number of hidden nodes. Defaults to maximum value, i.e., lags.

center

Whether to compute PCA on mean-adjusted data.

scale

Whether to compute PCA on variance-adjusted data.

bias

Whether to include bias term while computing output weights. Defaults to TRUE.

actfun

Activation function for the hidden layer. Defaults to sig. See ⁠Activation functions⁠.

Details

An Extreme Learning Machine (ELM) is trained wherein the weights connecting the input layer and hidden layer are obtained using Principal Component Analysis (PCA), instead of being chosen randomly. The number of hidden nodes is determined by the number of principal components.

Value

A list containing the trained ICA-ELM model with the following components.

inp_weights

Weights connecting the input layer to hidden layer, obtained from the unmixing matrix W of ICA. The columns represent the hidden nodes while rows represent input nodes.

out_weights

Weights connecting the hidden layer to output layer.

fitted.values

Fitted values of the model.

residuals

Residuals of the model.

h.out

A data frame containing the hidden layer outputs (activation function applied) with columns representing hidden nodes and rows representing observations.

data

The univariate ts data used for training the model.

lags

Number of lags used during training.

comps

Number of independent components considered for training. It determines the number of hidden nodes.

center

Whether the input data was mean-adjusted during training.

scale

Whether the input data was variance-adjusted during training.

bias

Whether bias node was included during training.

actfun

Activation function for the hidden layer. See ⁠Activation functions⁠.

Activation functions

The activation function for the hidden layer must be one of the following.

sig

Sigmoid function: (1 + e^{-x})^{-1}

radbas

Radial basis function: e^{-x^2}

hardlim

Hard-limit function: \begin{cases} 1, & if\:x \geq 0 \\ 0, & if\:x<0 \end{cases}

hardlims

Symmetric hard-limit function: \begin{cases}1, & if\:x \geq 0 \\ -1, & if\:x<0 \end{cases}

satlins

Symmetric saturating linear function: \begin{cases}1, & if\:x \geq 1 \\ x, & if\:-1<x<1 \\ -1, & if\:x \leq -1 \end{cases}

tansig

Tan-sigmoid function: 2(1 + e^{-2x})^{-1}-1

tribas

Triangular basis function: \begin{cases} 1-|x|, & if \: -1 \leq x \leq 1 \\ 0, & otherwise \end{cases}

poslin

Postive linear function: \begin{cases} x, & if\: x \geq 0 \\ 0, & otherwise \end{cases}

References

Pearson, K. (1901). LIII. On lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin philosophical magazine and journal of science, 2(11), 559-572. doi:10.1080/14786440109462720.

Castaño, A., Fernández-Navarro, F., & Hervás-Martínez, C. (2013). PCA-ELM: a robust and pruned extreme learning machine approach based on principal component analysis. Neural processing letters, 37, 377-392. doi:10.1007/s11063-012-9253-x.

See Also

pca.elm_forecast() for forecasing from trained PCA based ELM model.

Examples

train_set <- head(price, 12*12)
pca.model <- pca.elm_train(train_data = train_set, lags = 12)

[Package ICompELM version 0.1.0 Index]