Learn R Programming

ELMR (version 1.0)

predict_elm: Prediction function for the ELM model generated with the elm_training() function

Description

Prediction function for the ELM model generated with the elm_training() function

Usage

predict_elm(model, test)

Arguments

model
the output of the elm_training() function
test
dataset used to perform the testing of the model, the first column must be the column to be fitted for the regression or the labels for the classification

Value

returns the accuracy on the testset

References

[1] N.-Y. Liang, G.-B. Huang, P. Saratchandran, and N. Sundararajan, "A Fast and Accurate On-line Sequential Learning Algorithm for Feedforward Networks" IEEE Transactions on Neural Networks, vol. 17, no. 6, pp. 1411-1423, 2006

Examples

Run this code
x = runif(100, 0, 50)
y = sqrt(x)
train = data.frame(y,x)
train = data.frame(preProcess(train))
model = OSelm_train.formula(y~x, train, "regression", 100, "hardlim", 10, 10)
#' x = runif(100, 0, 50)
y = sqrt(x)
test = data.frame(y,x)
test = data.frame(preProcess(train))
accuracy = predict_elm(model, test)

Run the code above in your browser using DataLab