How do you format the function 'pcrsse' required for crossval?
Afficher commentaires plus anciens
Hi,
I am working through the example "Partial Least Squares Regression and Principal Components Regression" provided in the Mathworks Help Center. I have reached the part discussing cross validation as a method to determine the necessary number of principle components.
The instructions say it is necessary to calculate the mean squared prediction error (MSEP) for the principle component regression (PCR) using the function 'crossval.' In order to do this, you must make a function to determine the sum of squared error for PCR, but they do not give the code for this function only the name 'pcrsse.' However, inserting a function into crossval requires tricky formatting, I have also tried to follow the help file on 'crossval' with no success. Will someone please look at this example in the Help Center and help me develop this 'pcrsse' function? Many thanks.
Frederik
2 commentaires
Asvin Kumar
le 9 Juin 2020
Can you provide details on what you've tried so far and what issues you ran into while following the help file on crossval?
Frederik Schmidt
le 10 Juin 2020
Réponses (0)
Catégories
En savoir plus sur Gaussian Process Regression dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!