powered by
generates the code to create the prediction of the dimension reduction model.
rd_prediction(data = "datos.prueba", model.var = "modelo.svm", pred.var = "prediccion.rd", n.comp = "n.comp.rd", ncomp = NULL)
the name of the test data.
the name of the variable that stores the resulting model.
the name of the variable that stores the resulting prediction.
the name of the variable that stores the optimum number of components.
a numerical value in case you don't want to use the optimum number of components.
# 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 DataLab