フィルターのクリア

How can I test PCR model?

1 回表示 (過去 30 日間)
Ezz El-din Abdullah
Ezz El-din Abdullah 2018 年 6 月 19 日
I'm new to modeling principle component regression. I used MATLAB documentation to see an example on how to do it using the built-in functions. I just want to know how to test the model to try other examples than the training set.
This is the piece of code I want to investigate:
[PCALoadings,PCAScores,PCAVar] = princomp(X); %,'Economy',false);
betaPCR = regress(y-mean(y), PCAScores(:,1:2));
betaPCR = PCALoadings(:,1:2)*betaPCR;
betaPCR = [mean(y) - mean(X)*betaPCR; betaPCR];
yfitPCR = [ones(n,1) X]*betaPCR;
I think X should be the X that I want to test. The question is, what is 'y' here? This y I don't know, I actually want to predict it. Thanks!

回答 (0 件)

カテゴリ

Help Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by