After reading these two lines:
trainingSet - A matrix of the training set.
predictions - A matrix of predictions with the same size of rows of the trainingSet.
I'm in doubt about what the relationship is between the 'trainingSet' matrix and the 'predictions' matrix.
In my head, the training set should be an array of pairs of X and Y values.
In my head, I don't understand why we also need to feed a 'predictions' array to the algorithm.
It would also be nice if you would include the console.log(ans) output right after the example in which the pls.predict() function is called.
After reading these two lines:
I'm in doubt about what the relationship is between the 'trainingSet' matrix and the 'predictions' matrix.
In my head, the training set should be an array of pairs of X and Y values.
In my head, I don't understand why we also need to feed a 'predictions' array to the algorithm.
It would also be nice if you would include the
console.log(ans)output right after the example in which thepls.predict()function is called.