Dear all, I got a code for e1071 package in R for SVM regression. I have used *m$coefs* for extracting the coefficients but I am getting only 72 . How can I extract coefficients of the predictors set? Does it mean that I will get only 72 as *Number of Support Vectors: 72. * ** Thanks in advance
Code: -------------- library(e1071) > # create data > x <- seq(0.1, 5, by = 0.05) > y <- log(x) + rnorm(x, sd = 0.2) > # estimate model and predict input values > m <- svm(x, y) > new <- predict(m, x) > m Call: svm.default(x = x, y = y) Parameters: SVM-Type: eps-regression SVM-Kernel: radial cost: 1 gamma: 1 epsilon: 0.1 *Number of Support Vectors: 72* *> m$coefs* > new 1 2 3 4 5 6 7 8 9 10 11 12 -1.327786564 -1.277059853 -1.221424097 -1.161313628 -1.097200621 -1.029588549 -0.959005127 -0.885994883 -0.811111473 -0.734909901 -0.657938792 -0.580732849 13 14 15 16 17 18 19 20 21 22 23 24 -0.503805655 -0.427642943 -0.352696474 -0.279378612 -0.208057720 -0.139054438 -0.072638906 -0.009028968 0.051610615 0.109167970 0.163582945 0.214845022 25 26 27 28 29 30 31 32 33 34 35 36 0.262990384 0.308098215 0.350286330 0.389706259 0.426537887 0.460983809 0.493263495 0.523607428 0.552251329 0.579430594 0.605375062 0.630304214 37 38 39 40 41 42 43 44 45 46 47 48 0.654422894 0.677917633 0.700953619 0.723672382 0.746190188 0.768597174 0.790957190 0.813308346 0.835664193 0.858015504 0.880332573 0.902567958 49 50 51 52 53 54 55 56 57 58 59 60 0.924659570 0.946534037 0.968110220 0.989302798 1.010025830 1.030196181 1.049736754 1.068579418 1.086667584 1.103958361 1.120424239 1.136054277 61 62 63 64 65 66 67 68 69 70 71 72 1.150854762 1.164849331 1.178078576 1.190599126 1.202482259 1.213812069 1.224683251 1.235198555 1.245465988 1.255595825 1.265697515 1.275876563 73 74 75 76 77 78 79 80 81 82 83 84 1.286231447 1.296850678 1.307810045 1.319170135 1.330974176 1.343246256 1.355989966 1.369187496 1.382799201 1.396763660 1.410998202 1.425399923 85 86 87 88 89 90 91 92 93 94 95 96 1.439847127 1.454201198 1.468308834 1.482004603 1.495113765 1.507455297 1.518845050 1.529098984 1.538036397 1.545483098 1.551274451 1.555258224 97 98 99 1.557297215 1.557271572 1.555080800 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.