How to predict responses of new data from a crossvalidated SVR model
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
NCA
am 2 Feb. 2023
Beantwortet: Dr. JANAK TRIVEDI
am 2 Feb. 2023
Hi there
I have trained and cross validated my Support Vector Machine regressor model (CValidated_Mdl) with KFold cross validation technique.
I know I can predict responses by using YFit= kfoldPredict(CValidated_Mdl) where YFit are the new responses predicted by the model.
I also have a new set of data(unseen by model) which I will like to use to test the performance of my CValidated_Mdl.
This new and unseen data is called X_test.
I am not sure of how to use the cross validated model (CValidated_Mdl) to predict responses from the X_test data
I have tried YFit= kfoldPredict(CValidated_Mdl, X_test) without success
Can you advise please
Thank You
0 Kommentare
Akzeptierte Antwort
Dr. JANAK TRIVEDI
am 2 Feb. 2023
You can use the predict function in MATLAB to predict responses using the cross-validated model (CValidated_Mdl) and the new data X_test. The code would look like this:
YFit = predict(CValidated_Mdl.Trained{1}, X_test);
Note that CValidated_Mdl.Trained{1} is the trained SVM model for the first fold in the cross-validation, you can use any fold that you think has the best performance.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!