Learn R Programming

nnfor (version 0.9.9)

predict.elm.fast: Predictions for ELM (fast) network.

Description

Calculate predictions for ELM (fast) network.

Usage

# S3 method for elm.fast
predict(object, newx, na.rm = c(FALSE, TRUE), ...)

Value

Returns a list with:

  • Y.hat - Ensemble prediction.

  • Y.all - Predictions of each training repetition.

Arguments

object

ELM network object, produced using elm.fast.

newx

Explanatory variables. Each column is a variable.

na.rm

If TRUE remove columns and object produces an ensemble forecast, then remove any members that give NA in their forecasts.

...

Unused argument.

Author

Nikolaos Kourentzes, nikolaos@kourentzes.com

See Also

elm.fast.

Examples

Run this code
# \dontshow{
 p <- 2000
 n <- 150
 X <- matrix(rnorm(p*n),nrow=n)
 b <- cbind(rnorm(p))
 Y <- X %*% b
 fit <- elm.fast(Y,X,reps=1)
 predict(fit,X)
# }
if (FALSE) {
 p <- 2000
 n <- 150
 X <- matrix(rnorm(p*n),nrow=n)
 b <- cbind(rnorm(p))
 Y <- X %*% b
 fit <- elm.fast(Y,X)
 predict(fit,X)
}

Run the code above in your browser using DataLab