0

I wrote SVM in AMPL , data has 9236 rows . In AMpl it can not be solved . After 30 minutes I get error that memory is not enough. but for that data set I use R and it takes 60 second to solve! it is very weird, isn't it? I am wondering how R solve this problem? I tried to get source code of SVM in R but I couldn't see what is exactly going on! I typed.

     getAnywhere(svm.formula)

but it doesn't show me the algorithm. Does anybody know what is going on here?

sherek_66
  • 501
  • 5
  • 14
  • R doesn't have an SVM built-in. You must have used some package, which one? You will need to look in that package's code. – Gregor Thomas Aug 05 '19 at 20:14
  • its e1071, could you plz tell me how I can do that? – sherek_66 Aug 05 '19 at 20:23
  • There's a mirror of CRAN on github, so if you google "github " you can usually find the code there. Then search the package for the function you want. In this case, it looks like most of the work [is done in C](https://github.com/cran/e1071/blob/c55f1d7c5e337428496f638386b48d85303247c2/src/Rsvm.c) – Gregor Thomas Aug 05 '19 at 20:30
  • can I add a constraint to it then run it? – sherek_66 Aug 05 '19 at 21:19

0 Answers0