Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

svm classifier

Hello,

I have problems with SVM classification.

I have a set of training samples fed through custom feature vector into SVM.

Samples are in 4 groups, several samples for each.

 

Once I want to classify, the SVM behaves very weird, since I am probably unable to set it up properly.

I tried to work with parameters, but failed to get atleast 1 somehow working solution.

 

Once the svm is trained. It classifies all incoming samples as a class with most training samples unless the classified sample is the trained one. After this the classification is correct.

Also, no matter what numbers I feed into it during classification, the Ident. and Class scores are the same for all samples, same for the distance table.

 

I tried both possible kernels; RBF and Gauss, but both give the same results, also for the model, I tried both nu and c - svc.

 

The very weird is the classification output, that does not change, only re-training with different parameters makes difference (read: the output is different but same for all samples)

 

I tried to use LibSVM, and using gauss kernel with default parameters worked nicely for me, but the naming convention is different for vision library and libsvm.

 

The vision library nearest neighbourgh classifier on the other hand works nicely 🙂

 

I have allready read the vision concepts and some pdf files on SVM networks, but however I think I do have enough knowledge to understand it, it still malfunctions.

 

Please, suggest what am I doing wrong.

 

Edit. : I tried to train@classify also with different feature vector sizes, no success.

0 Kudos
Message 1 of 7
(6,419 Views)

Hi Bublina, I have the same issue here. When I have a two-class data the SVM seems work fine. But it didn't give me labels other than 0 and 1. So I cannot sort multiple classes.

So what does the parameter and the soft margin paramters mean in "SVM learn.vi"? And what data type should parameter be? Sorry I am new to ML and asked stupid questions. Thanks for helping.

Regads,

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 2 of 7
(6,295 Views)

Update: I think the multiclass classification is not built in in the toolkit and I created a multiclass classifier using one-vs-all method. I put it here .

But I am still not sure what the two parameters are and how I shall set them.

 

Regards,

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 3 of 7
(6,271 Views)

@foolooo wrote:

Hi Bublina, I have the same issue here. When I have a two-class data the SVM seems work fine. But it didn't give me labels other than 0 and 1. So I cannot sort multiple classes.

So what does the parameter and the soft margin paramters mean in "SVM learn.vi"? And what data type should parameter be? Sorry I am new to ML and asked stupid questions. Thanks for helping.

Regads,

Bo


Hi,

You are refering to a different toolkit/library.

The one I am using is in Vision development module.

 

Here is a good article that describes svm learning process. Article.

0 Kudos
Message 4 of 7
(6,248 Views)

Oops, my fault. Thanks, Bublina. This article is helpful. Cheers.

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 5 of 7
(6,236 Views)

Hi,

I want to ask some questions. I want to classify more than two classes such as label 0,1,2,3...to 7. How can I do? I have saw your article to discrete more than 2 classes. But I see there are set to label 0 or 1.

Thank you.

Best Regard,

Neil

Email: freedom21596@gmail.com

0 Kudos
Message 6 of 7
(3,254 Views)

Hi,Bo,

 

I'm glad to find that you are good at using SVM classifier.I'm not sure if you can see my questions. But I still hope you can see it.

 

I'm trying to classify the embryo and not_embryo of  faces of corn seeds.The samples  belong to two classes obviously. Firstly, I trained a classifier using SVM classifier. Then I want to classify the samples using the trained classifier file. There was an error named "This classifier function cannot be called on this of classifier session" poped out. Is the classifier file unqualified? 

 

I'll appreciate it with any suggestion.

 

 

0 Kudos
Message 7 of 7
(2,385 Views)