I have problems with labeling on machine learning, initially I suppose labeling on machine learning is all the same. after I try and practice it, turns out there is a difference between SVM and MLP labeling. Is that true ? I'm working on assignment for the classification of vehicles(cars, trucks and buses) by using LBP to obtain the characteristics, please help me to solve this problem and can someone explain how to do the correct labeling for SVM and MLP (ANN) ???
Asked
Active
Viewed 205 times
-1
-
It's the same, but some classifiers are only build for two-class tasks while some are naturally multi-class (where some strategy is needed to solve the multi-task problem with a two-class classifier). But your question is very low quality as you don't provide any specifics at all. It's also off-topic. – sascha Oct 19 '16 at 14:31
1 Answers
0
In most ML frameworks you tell the class of every data using a number that tells the class of every data but internally:
SVMs:
Originally SVM formulation is for binary classification and labels take values +1 and -1.
You can perform multiclass classification when you have n classes creating n binary classifier that use +1 in his class and -1 in the other classes.
You select the class whose binary classifier obtains a higher output.
But most of the implementations like libsvm do that internally so you dont have to worry about it.
MLPs:
You can perform multiclass classification with ANN by training the net using an output for every data that is a vector of length n filled withof 0s with a 1 in the position that belongs to his class.

Rob
- 1,080
- 2
- 10
- 24
-
Thank you in advance for your answer ... but could you explain in more detail for the MLP because I've tried to find ways labeling but has not been able, I do not understand how to make the output vector to label them, please help because I am a newbie here – muhammad irfan Nov 07 '16 at 07:12
-
For example, if you have 3 classes (car, truck, bus), the label of car could be the vector [1,0,0], the label of a truck is [0,1,0] and the label of a bus is [0,0,1]. Once you have trained the Neural Net, if the output for a new behicle is [0.1,0.7,0.2] then you classify it as a truck because the second possition has the highest output and that possition correspond to a truck. – Rob Nov 07 '16 at 08:21
-
oh, so it turns out to forgive me for being a little knowledge I guess the first label in the same MLP svm and therefore I label it with this "Mat labels(numSamples, 3 , CV_32FC1, Scalar(3,0)); labels.rowRange(0, numcar) = Scalar (1.0); labels.rowRange(numcar, numcar + numbus - 1) = Scalar (2.0); labels.rowRange(numcar + numbus, numSamples - 1) = Scalar (3.0); " and it turns out that I get the same output all its worth, whether it was a mistake in the label? thanks in advance have answered my question, and forgive me for my language is hard to understand – muhammad irfan Nov 07 '16 at 09:24