Why I can't import my data into the classification learner app?

조회 수: 8 (최근 30일)
Ng Yong Jie
Ng Yong Jie 2022년 3월 12일
댓글: Image Analyst 2022년 3월 15일
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.

채택된 답변

Image Analyst
Image Analyst 2022년 3월 14일
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
Ng Yong Jie
Ng Yong Jie 2022년 3월 15일
Thanks for the explanation! May I know if the SVM in the classification learner app is for anomaly detection?
Image Analyst
Image Analyst 2022년 3월 15일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

yanqi liu
yanqi liu 2022년 3월 14일
yes,sir,may be check your workspace to find variable,if not exist,may be generate it and load it in app
  댓글 수: 1
Ng Yong Jie
Ng Yong Jie 2022년 3월 14일
May I know what do you mean by check the workspace to find variables? I've run my code (autoencoder) and trying to use the data in the autoencoder and feed into the classification learner. Thanks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Classification Learner App에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by