I have trained the data using linear SVM. And from classification learner, I have exported the trained model to work space. I have written the following code for test data prediction as follows.. function Test_svm1() d = dir('*.xlsx'); fileName = d.

1 次查看(过去 30 天)
I have trained the data using linear SVM. And from classification learner, I have exported the trained model to work space. I have written the following code for test data prediction as follows.. function Test_svm1() d = dir('*.xlsx'); fileName = d.name; %// Get the file name filename = 'DBModified_DTCWT_4Level_TST.xlsx'; sheet = 1; trainingData = xlsread(fileName,sheet); [trainedClassifier, validationAccuracy] = trainClassifier(trainingData);
filename = 'DBModified_DTCWT_4Level_TST.xlsx'; T = xlsread(filename); yfit=predict(trainedModel,T(:,trainedModel.predictFcn)); end But I get the following error Function 'subsindex' is not defined for values of class 'cell'. Error in trainClassifier (line 48) predictors = inputTable(:, predictorNames);
Error in Test_svm1 (line 7) [trainedClassifier, validationAccuracy] = trainClassifier(trainingData); Pl suggest me where i have done mistake Regards Aditi Vedalanka

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by