I know that there is a hard coded number of maximal iterations in the e1071 svm() function, but can someone tell me how high this number is?
Asked
Active
Viewed 346 times
1 Answers
2
SVM implementation of e1071
is an R interface to the C++ libsvm
library developed by Chih-Jen Lin. The best way to figure out what iteration limit is used is to look at the source code here. Line 561 defines the iteration limit:
int max_iter = max(10000000, l>INT_MAX/100 ? INT_MAX : 100*l);
The value of INT_MAX
varies from compiler to compiler, so it would be fair to say that the practical iteration limit is in most cases 10000000.

slava-kohut
- 4,203
- 1
- 7
- 24
-
Thank you. I allready looked there, but my C++ skills are not existent. – Mirko Oct 04 '19 at 14:30
-
I extracted `e1071` from https://cran.r-project.org/src/contrib/e1071_1.7-13.tar.gz . I modified this line (line 567) in `e1071/src/svm.cpp`. I used the Rtools installer at https://cran.r-project.org/bin/windows/Rtools/rtools43/files/rtools43-5550-5548.exe . Because I was using RStudio, in the console of RStudio I ran `install.packages("C:/Users/Tom/Documents/e1071", repos = NULL, type = "source")`. How does this command cause `e1071/src/e1071.dll` to be built? – Tom Lever Aug 10 '23 at 05:14