Code problem of SVM in concrete regression
Show older comments
I am doing SVM learning, the code is
[Predict_1,error_1] = svmpredict(tn_train,pn_train,model);
[Predict_2,error_2] = svmpredict(tn_test,pn_test,model); taken from GitHub, but there are problems, mainly for this piece of code after running, it is empty set
Answers (1)
Umar
on 1 Jul 2024
0 votes
Hi ZZ,
After reading your comments, I can think of mismatched dimensions of input data, improper model initialization, or errors in the svmpredict function call. Implement error handling to capture any exceptions that might occur during the prediction process.
try [Predict_1, error_1] = svmpredict(tn_train, pn_train, model); [Predict_2, error_2] = svmpredict(tn_test, pn_test, model); catch ME disp('An error occurred during prediction:'); disp(ME.message); end
Hope this will help resolve your problem. Let me know if I can assist further.
Categories
Find more on Discriminant Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!