Title: | Independent Component Analysis Based Extreme Learning Machine |
---|---|
Description: | Single Layer Feed-forward Neural networks (SLFNs) have many applications in various fields of statistical modelling, especially for time-series forecasting. However, there are some major disadvantages of training such networks via the widely accepted 'gradient-based backpropagation' algorithm, such as convergence to local minima, dependencies on learning rate and large training time. These concerns were addressed by Huang et al. (2006) <doi:10.1016/j.neucom.2005.12.126>, wherein they introduced the Extreme Learning Machine (ELM), an extremely fast learning algorithm for SLFNs which randomly chooses the weights connecting input and hidden nodes and analytically determines the output weights of SLFNs. It shows good generalized performance, but is still subject to a high degree of randomness. To mitigate this issue, this package uses a dimensionality reduction technique given in Hyvarinen (1999) <doi:10.1109/72.761722>, namely, the Independent Component Analysis (ICA) to determine the input-hidden connections and thus, remove any sort of randomness from the algorithm. This leads to a robust, fast and stable ELM model. Using functions within this package, the proposed model can also be compared with an existing alternative based on the Principal Component Analysis (PCA) algorithm given by Pearson (1901) <doi:10.1080/14786440109462720>, i.e., the PCA based ELM model given by Castano et al. (2013) <doi:10.1007/s11063-012-9253-x>, from which the implemented ICA based algorithm is greatly inspired. |
Authors: | Saikath Das [aut, cre], Ranjit Kumar Paul [aut], Md Yeasin [aut], Amrit Kumar Paul [aut] |
Maintainer: | Saikath Das <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-10-31 18:38:00 UTC |
Source: | https://github.com/cran/ICompELM |
Forecasts are generated recursively from a trained Extreme Learning Machine built using Independent Component Analysis.
ica.elm_forecast(ica.elm_model, h = 1)
ica.elm_forecast(ica.elm_model, h = 1)
ica.elm_model |
A trained ICA based ELM model. |
h |
Number of periods for forecasting. Defaults to one-step ahead forecast. |
Vector of point forecasts.
ica.elm_train()
for training an ICA based ELM model.
train_set <- head(price, 12*12) test_set <- tail(price, 12) ica.model <- ica.elm_train(train_data = train_set, lags = 12) y_hat <- ica.elm_forecast(ica.elm_model = ica.model, h = length(test_set)) # Evaluation of the forecasts if(require("forecast")) forecast::accuracy(y_hat, test_set)
train_set <- head(price, 12*12) test_set <- tail(price, 12) ica.model <- ica.elm_train(train_data = train_set, lags = 12) y_hat <- ica.elm_forecast(ica.elm_model = ica.model, h = length(test_set)) # Evaluation of the forecasts if(require("forecast")) forecast::accuracy(y_hat, test_set)
An Extreme Learning Machine is trained by utilizing the concept of Independent Component Analysis.
ica.elm_train(train_data, lags, comps = lags, bias = TRUE, actfun = "sig")
ica.elm_train(train_data, lags, comps = lags, bias = TRUE, actfun = "sig")
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., |
bias |
Whether to include bias term while computing output weights.
Defaults to |
actfun |
Activation function for the hidden layer. Defaults to
|
An Extreme Learning Machine (ELM) is trained wherein the weights connecting the input layer and hidden layer are obtained using Independent Component Analysis (ICA), instead of being chosen randomly. The number of hidden nodes is determined by the number of independent components.
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 |
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 |
lags |
Number of lags used during training. |
comps |
Number of independent components considered for training. It determines the number of hidden nodes. |
bias |
Whether bias node was included during training. |
actfun |
Activation function for the hidden layer.
See |
The activation function for the hidden layer must be one of the following.
sig
Sigmoid function:
radbas
Radial basis function:
hardlim
Hard-limit function:
hardlims
Symmetric hard-limit function:
satlins
Symmetric saturating linear function:
tansig
Tan-sigmoid function:
tribas
Triangular basis function:
poslin
Postive linear function:
Huang, G. B., Zhu, Q. Y., & Siew, C. K. (2006). Extreme learning machine: theory and applications. Neurocomputing, 70(1-3), 489-501. doi:10.1016/j.neucom.2005.12.126.
Hyvarinen, A. (1999). Fast and robust fixed-point algorithms for independent component analysis. IEEE transactions on Neural Networks, 10(3), 626-634. doi:10.1109/72.761722.
ica.elm_forecast()
for forecasting from trained ICA based ELM
model.
train_set <- head(price, 12*12) ica.model <- ica.elm_train(train_data = train_set, lags = 12)
train_set <- head(price, 12*12) ica.model <- ica.elm_train(train_data = train_set, lags = 12)
Forecasts are generated recursively from a trained Extreme Learning Machine built using Principal Component Analysis.
pca.elm_forecast(pca.elm_model, h = 1)
pca.elm_forecast(pca.elm_model, h = 1)
pca.elm_model |
A trained PCA based ELM model. |
h |
Number of periods for forecasting. Defaults to one-step ahead forecast. |
Vector of point forecasts.
pca.elm_train()
for training an ICA based ELM model.
train_set <- head(price, 12*12) test_set <- tail(price, 12) pca.model <- pca.elm_train(train_data = train_set, lags = 12) y_hat <- pca.elm_forecast(pca.elm_model = pca.model, h = length(test_set)) # Evaluation of the forecasts if(require("forecast")) forecast::accuracy(y_hat, test_set)
train_set <- head(price, 12*12) test_set <- tail(price, 12) pca.model <- pca.elm_train(train_data = train_set, lags = 12) y_hat <- pca.elm_forecast(pca.elm_model = pca.model, h = length(test_set)) # Evaluation of the forecasts if(require("forecast")) forecast::accuracy(y_hat, test_set)
An Extreme Learning Machine is trained by utilizing the concept of Principal Component Analysis.
pca.elm_train( train_data, lags, comps = lags, center = TRUE, scale = TRUE, bias = TRUE, actfun = "sig" )
pca.elm_train( train_data, lags, comps = lags, center = TRUE, scale = TRUE, bias = TRUE, actfun = "sig" )
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., |
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 |
actfun |
Activation function for the hidden layer. Defaults to
|
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.
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 |
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 |
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 |
The activation function for the hidden layer must be one of the following.
sig
Sigmoid function:
radbas
Radial basis function:
hardlim
Hard-limit function:
hardlims
Symmetric hard-limit function:
satlins
Symmetric saturating linear function:
tansig
Tan-sigmoid function:
tribas
Triangular basis function:
poslin
Postive linear function:
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.
pca.elm_forecast()
for forecasing from trained PCA based ELM
model.
train_set <- head(price, 12*12) pca.model <- pca.elm_train(train_data = train_set, lags = 12)
train_set <- head(price, 12*12) pca.model <- pca.elm_train(train_data = train_set, lags = 12)
National aggregate price of gram from Indian markets, which is a major pulse in the country. The observations range from January, 2010 upto December, 2023.
price
price
A ts
object with 156 observations.
plot(price, xlab = "Year", ylab = "Aggregate price of Gram (Rs./Bag)")
plot(price, xlab = "Year", ylab = "Aggregate price of Gram (Rs./Bag)")