regressoR (version 1.1.8)

rd_prediction: rd_prediction

Description

generates the code to create the prediction of the dimension reduction model.

Usage

rd_prediction(data = "datos.prueba", model.var = "modelo.svm",
  pred.var = "prediccion.rd", n.comp = "n.comp.rd", ncomp = NULL)

Arguments

data

the name of the test data.

model.var

the name of the variable that stores the resulting model.

pred.var

the name of the variable that stores the resulting prediction.

n.comp

the name of the variable that stores the optimum number of components.

ncomp

a numerical value in case you don't want to use the optimum number of components.

Examples

Run this code
# NOT RUN {
library(pls)

x <- rd_model('iris', 'Petal.Length')
exe(x)
print(modelo.rd)

x <- rd_prediction('iris', 'modelo.rd', 'my_prediction')
exe(x)
print(my_prediction)

# }

Run the code above in your browser using DataCamp Workspace