Plotting data from an svm fit - hyperplane

后端 未结 2 1144
醉话见心
醉话见心 2020-12-04 11:48

I used svm to find a hyperplane best fit regression dependent on q, where I have 4 dimensions: x, y, z, q.

fit <- svm(q ~ ., data=data,kernel=\'linear\')
         


        
2条回答
  •  清歌不尽
    2020-12-04 12:08

    I'm just starting out in R myself, but there's a decent tutorial on using the e1071 package in R for regression rather than classification:

    http://eric.univ-lyon2.fr/~ricco/tanagra/fichiers/en_Tanagra_Support_Vector_Regression.pdf

    with a zip file of the test dataset and R script in:

    http://eric.univ-lyon2.fr/~ricco/tanagra/fichiers/qsar.zip

    Skip the first section on Tanagra and head straight to section 6 (page 14). It has its faults, but it gives examples of using R for linear regression, SVR with epsilon-regression and with nu-regression. It also makes a stab at demonstrating the tune() method (but could be done better, IMHO).

    (Note: if you choose to run the examples in that paper, don't bother trying to find a working copy of xlsReadWrite -- it's much easier to export qsar.xls as a .csv file and just use read.csv() to load the dataset.)

提交回复
热议问题