Skip to contents

Under development. This function is meant to predict the scores of features obtained from a trained model such as one returned by the 'reduce_*' family of functions. In particular, the function would ideally work with any technique implemented so far (PCA, rPCA, ICA) and whether or not scaling and centering have been required. This function could be used then within a more stringent crossclassification approach (in which scores are computed) anew, or even with different tasks to check whether different signatures can be observed in an independent pool of data. It takes as input a "time" argument to ensure the timepoints used by the model to compute the loadings match, if they don't the function returns an error.

Usage

predict_feature(vector, time, model)

Arguments

vector

A vector variable to be transformed according to the given model. Usually the pupil dimension for a trial/condition.

time

A vector variable indicating the elapsed time. Should be the same as the loadings' names in the model

model

Object returned by 'reduce_*', e.g. 'reduce_PCA()'.

Value

A numeric vector of scores - as many as the loadings in the model.