[R] best.svm

2005-05-24 Thread Stephen Choularton
Hi
 
I am trying to fit an svm to predict  speech recognition errors.  I am
using best.svm like this:
 
svm.model = best.svm(data[1:3000,1:23],data[1:3000,24],tunecontrol =
tune.control())
 
I got this:
 
 print(svm.model)
 
Call:
 best.svm(x = data[1:3000, 1:23], tunecontrol = tune.control(),
data[1:3000, 24]) 
 
Parameters:
   SVM-Type:  eps-regression 
 SVM-Kernel:  radial 
   cost:  1 
  gamma:  0.04347826 
epsilon:  0.1 
 
 
Number of Support Vectors:  970
 
But when I applied it:
 
 
 pred = predict(svm.model, data[3001:4000,1:23])
 pred[pred  .5] = 1 
 pred[pred = .5] = 0 
 t = table(pred,data[3001:4000,24])
 t

pred 0   1  
   1  65 935
 classAgreement(t)
$diag
[1] 0.065
 
$kappa
[1] 0
 
$rand
[1] 0.8783283
 
$crand
[1] 0
 
It didn’t produce really good results.
 
Will best.svm get me the best svm?  Have I given it the wrong
parameters?
 
Any help most welcome.
 
Stephen

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.

 

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] best.svm

2005-05-24 Thread David Meyer
Stephen:

you need to supply the parameter ranges, your call did not tune anything
at all.
best.svm() is really just a wrapper for tune.svm(...)$best.model. The
help page for 'tune()' will tell you more on the available options.

HTH,

David


[...]

 svm.model = best.svm(data[1:3000,1:23],data[1:3000,24],tunecontrol =
 tune.control())

[...]

 It didn_t produce really good results.
 
 Will best.svm get me the best svm?  Have I given it the wrong
 parameters?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html