Why I can't import my data into the classification learner app?
9 views (last 30 days)
Show older comments
Ng Yong Jie
on 12 Mar 2022
Commented: Image Analyst
on 15 Mar 2022
I used the same data set variable for the classification learner app initially and it works. May I know why is it not working this time using the same data set variable? I am using it for the SVM to detect the anomalies in my autoencoders.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/924734/image.png)
0 Comments
Accepted Answer
Image Analyst
on 14 Mar 2022
Your response variable needs to be a column vector with 1000 rows -- 1000 x 1 -- since there needs to be a response for every observation (row) in your predictors matrix. You have 1000 observations, and for every observation you have 26 measurements or feature values that describe that observation. Therefore you need 1000 "ground truth" values, which is one for every row in your predictors matrix. You evidently do not have that. No such column vector exists in your workspace.
2 Comments
Image Analyst
on 15 Mar 2022
Perhaps. Upload your training data - your predictors table. This is your table of predictive measurements that you hope will predict which class your data is. Also upload your ground truth data. A vector of class numbers that represent the known, correct class for each observation (row) in your predictors table. Then I can see if I can run it.
% Save variables containing predictors and true class numbers to a .mat file.
save('answers.mat', 'tPredictors', 'trueClassNumbers');
using the actual variable names that you're using of course.
More Answers (1)
yanqi liu
on 14 Mar 2022
yes,sir,may be check your workspace to find variable,if not exist,may be generate it and load it in app
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!