elm.fast {nnfor}R Documentation

ELM (fast) neural network.

Description

Fit ELM (fast) neural network. This is an ELM implementation that does not rely on neuralnets package.

Usage

elm.fast(
  y,
  x,
  hd = NULL,
  type = c("lasso", "ridge", "step", "ls"),
  reps = 20,
  comb = c("median", "mean", "mode"),
  direct = c(FALSE, TRUE),
  linscale = c(TRUE, FALSE),
  output = c("linear", "logistic"),
  core = c("FALSE", "TRUE"),
  ortho = c(FALSE, TRUE)
)

Arguments

y

Target variable.

x

Explanatory variables. Each column is a variable.

hd

Starting number of hidden nodes (scalar). Use NULL to automatically specify.

type

Estimation type for output layer weights. Can be "lasso" (lasso with CV), "ridge" (ridge regression with CV), "step" (stepwise regression with AIC) or "lm" (linear regression).

reps

Number of networks to train.

comb

Combination operator for forecasts when reps > 1. Can be "median", "mode" (based on KDE estimation) and "mean".

direct

Use direct input-output connections to model strictly linear effects. Can be TRUE or FALSE.

linscale

Scale inputs linearly between -0.8 to 0.8. If output == "logistic" then scaling is between 0 and 1.

output

Type of output layer. It can be "linear" or "logistic". If "logistic" then type must be set to "lasso".

core

If TRUE skips calculation of final fitted values and MSE. Called internally by "elm" function.

ortho

If TRUE then the initial weights between the input and hidden layers are orthogonal (only when number of input variable <= sample size).

Value

An object of class "elm.fast". The function plot produces a plot the network fit. An object of class "elm.fast" is a list containing the following elements:

Note

This implementation of ELM is more appropriate when the number of inputs is several hundreds. For time series modelling use elm instead.

Author(s)

Nikolaos Kourentzes, nikolaos@kourentzes.com

References

See Also

elm.

Examples


## Not run: 
 p <- 2000
 n <- 150
 X <- matrix(rnorm(p*n),nrow=n)
 b <- cbind(rnorm(p))
 Y <- X %*% b
 fit <- elm.fast(Y,X)
 print(fit)

## End(Not run)


[Package nnfor version 0.9.9 Index]