Dr Bo Fu is a Certified LabVIEW Developer and joined the Austin Consultants team in December 2013 as a Systems Engineer. Dr Fu joins us from the University of Nottingham where he completed his PhD and did a Postdoc in Electronic Engineering, developing a high-speed dynamic-sampling camera and a real-time control spatial light modulator.
Dr Fu is currently working on a very exciting project involving a combination of different AI techniques including Neural Networks, K-means and SVN to name a few. Dr Fu posts regularly on his blog and has written the post below about using SVM to do multiclass classification.
Dr Fu explains:
“Today I came across a problem to use SVM to do multiclass classification. The toolkit downloaded from NI did not provide the ability to do multiclass classification with SVM but only for two classes (it’s quite a useful tool still). So I took use of the SVM VIs and made a multiclass version using one-vs-all method.
There is a good tutorial on one-vs-all or one-vs-rest classification by Andrew Ng. We pick one class each iteration as Class A and make the rest classes as Class B. Only the test data that locate in Class A are allocated to the known class. Here is the code:
The original trained labelled data are classified as Class 0, 1, 2, … N. In the i-th iteration, only the data from Class i are re-classified to Class 1 and the rest data are re-classified to Class 0. When the test data locate in class 1 area, they are classified as Class i. Any unsorted data are left in Class -1.
When I test the performance of this one-vs-all classifier, the result seems fine.