How do you format the function 'pcrsse' required for crossval?
이전 댓글 표시
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
Asvin Kumar
2020년 6월 9일
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
2020년 6월 10일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!