Ask Your Question
1

LatentSVM: svmlight training parameters

asked 2013-07-10 04:45:50 -0600

vinayverma gravatar image

updated 2013-07-10 05:00:36 -0600

I am trying to train a model for svm using HOG features. I have created the features file from positives & negatives. The function SVMlight::getInstance()->read_problem("genfiles\features.dat") executes without errors (Following is the output):

Reading files, generating HOG features and save them to file 'genfiles/features.
dat':
Calling SVMlight
Scanning examples...done
Reading examples into memory...100..200..300..400..500..600..700..800..900..OK.
(936 examples read)

However, when I call:

SVMlight::getInstance()->train();

It fails with the following output:

Optimizing...........................................................done. (60 i
terations)
Optimization finished (maxdiff=0.00098).
Runtime in cpu-seconds: 2.09
Number of SV: 75 (including 1 at upper bound)
L1 loss: loss=0.02505
Norm of weight vector: |w|=0.32211
Norm of longest example vector: |x|=14.71081
Number of kernel evaluations: 16574
Writing alpha file... No such file or directory

I debugged it and found that the alpha file path in the function "write_alphas" is garbage. May be because I have not passed any parameters to the svmlight (LEARN_PARM* learn_parm is not set to any valid values?).

Could anybody please provide some directions on these parameters?

Thanks.

edit retag flag offensive close merge delete

Comments

2

Thanks Steven for the formatting. I was just searching for the formatting options and found that you formatted it. Thanks.

vinayverma gravatar imagevinayverma ( 2013-07-10 05:10:41 -0600 )edit

I didn't understand - are you trying to train a new model for latent svm or just a new model for HOG + SVM?

GilLevi gravatar imageGilLevi ( 2014-06-17 09:17:00 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-17 08:57:42 -0600

knucklehead gravatar image

In svmlight.h replace

learn_parm->alphafile[0] = ' ';

with

strcpy(learn_parm->alphafile, "")

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-07-10 04:45:50 -0600

Seen: 1,114 times

Last updated: Jun 17 '14