Error using cross validation with plsregress
古いコメントを表示
Hi everyone,
I am running a PLS regression and try to perform cross validation (k-fold) with matlab data.
load spectra
X = NIR;
y = octane;
[XL,yl,XS,YS,beta,PCTVAR,MSE] = plsregress(X,y,10,'CV',10);
Unfortunately, this error appear:

Could you explain to me how to solve it please?
Thank you in advance for your help.
Bruno
4 件のコメント
Adam Danz
2020 年 9 月 23 日
When I run the example code you shared, it runs smoothly in r2020b.
What release are you using?
You may have a file or function named "crossval" that is shadowing Matlab's crossval() function.
The line in the screenshot that indicates the error in that function contains variable names and commands that are not in the built-in crossval() function, at least not in r2020b. But that could also be explained by using an older release of Matlab.
To list functions with the name crossval,
which crossval -all
bruno ebel
2020 年 9 月 24 日
bruno ebel
2020 年 9 月 24 日
bruno ebel
2020 年 9 月 24 日
採用された回答
その他の回答 (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!
