SVM: Classify using LearnerWeights
显示 更早的评论
I used fitcecoc to train a multiclass svm algorithm on MATLAB, the resulting struct has all the weights and the bias. Which formula should I use to classify a new data x without using predict? I've tried this one: f=x'*weight+bias but it doesn't work. Please help! Thank you!!
1 个评论
Johanna Richter
2020-10-19
编辑:Johanna Richter
2020-10-19
fitcecoc trains several binary models which you can get seperately with Mdl.BinaryLearners. They each contain weight and bias for one binary learner. You can check which binary learner put which classes of data into one class for learning by checking Mdl.CodingMatrix.
Check the MATLAB documentiation for the object -CompactClassificationECOC-. This is the object your model is when learned with fitcecoc (when trained with the corresponding options, but the other ones are not very different regarding the return values). There you can read all about how your model is constructed.
There is a reason there is the function predict. A multiclass modell is complicated, especially if you don't use onevsone, or expand to kernel functions and other options!
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Networks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!