0

I've used Matlab Classification Learner App to train my SVM classifier and i have 99.9% of accuracy in prediction (i tested it with the function predict on matlab). What i wanted to do now was to predict without usind this function but using the hyperplane. I exported the trained classifier and so i have all the weights and the bias to find the hyperplane. Which formula should i use to predict new data? I tryed computing the sign of w'x but it works only in few cases. Can you help me understand what should i do?

Thanks a lot!

  • Could you post what you've already tried? – meyer9 Mar 23 '17 at 14:56
  • Yes! Before i post what i've done you must know that i have 15 classes and ach observation is 1x64. Considering that the SVM is a binary classification the classification learner app generate 105 binart learners. they are 105 because i'll have 14 tests for class number 1 (1 compared to 2, 1 compared to 3... 1 compared to 15). In this test it will result class 1 if the data belongs to class 1, -1 if it belongs to all the others. Then i have 13 tests for class number 2(2 compared to 3, 2 compared to 4.. 2 compared to 15) and so on. I have all the weights and the bias for all these tests. – user7757300 Mar 23 '17 at 15:33
  • I tried to classify an observation x, which i know for sure belongs to class 1 and i used the first binary learner. So i'll have: weight=trainedClassifier.ClassificationSVM.BinaryLearners{1,1}.Beta; bias=trainedClassifier.ClassificationSVM.BinaryLearners{1,1}.Bias; scale=trainedClassifier.ClassificationSVM.BinaryLearners{1,1}.KernelParameters.Scale; The dimensions are: weight=64x1; x=1x64; I used this formula to classify: (x/scale)*weight+bias; I expected to find 1 or a value bigger than 1 from this formula but i have 0.2197. Is it the formula that is wrong? – user7757300 Mar 23 '17 at 15:39

0 Answers0