How to make predictions wit Partial Least Squares (PLSregress)

27 ビュー (過去 30 日間)
jose Neria
jose Neria 2016 年 11 月 2 日
回答済み: Juan Villacrés 2019 年 2 月 7 日
Hi all. I'm reading the example of how to use partial least squares (https://www.mathworks.com/help/stats/examples/partial-least-squares-regression-and-principal-components-regression.html) But I have a question, if I divide the y-data as
y_train = y(1:50);
y_test = y(51:end);
X_train = X(1:50,:);
X_test = X(51:end,:);
and I follow the exmaple by doing
[Xloadings,Yloadings,Xscores,Yscores,betaPLS] = plsregress(X_train,y_train,2);
How can I use this information in order to make predictions for the test data?

回答 (1 件)

Juan Villacrés
Juan Villacrés 2019 年 2 月 7 日

カテゴリ

Help Center および File ExchangeModel Building and Assessment についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by