predict.plsr: Predict from a plsr object

Description Usage Arguments Examples

View source: R/pls_func.R

Description

This function can be used to make predictions from one original data space to the other. Prediction direction can be forward, meaning X to Y direction and backward, meaning Y to X prediction.

Usage

1
2
## S3 method for class 'plsr'
predict(object, new_data, direction = "forward", ...)

Arguments

object

A plsr object.

new_data

The data from which you want to predict.

direction

The direction of prediction. Default is "forward" meaning X to Y. Every other argument will result in backward prediction.

...

Additional arguments.

Examples

1
2
3
4
5
plsr_obj = pls(rating_data,tracking_data,10,10)
prediction=predict(plsr_obj,runif(7,1,101),"forward")

#visualizing results with face tracking data specific function
plsr:::plot_frame(prediction)

plsr documentation built on May 1, 2019, 11:28 p.m.