Custom kernel in e1071

I am currently trying to set up a function svm

in a package e1071

for R

. my input is genomic data (each attribute takes a value in the set {-1, 0, 1}) and none of the four cores currently offered in the package really fit this kind of data --- I'd like to use Hamming distance instead of my kernel.

The function svm

seems to be written in C++

. i downloaded the source via

download.packages(pkgs = "e1071", 
    destdir = ".",
    type = "source")

      

found a file svm.cpp

containing the code for the function and the corresponding kernel part where I can add my own kernel. has anyone tried to do this? Is it possible to do this? once i finish modifying svm.cpp

(assuming i figure out how ..) how do i make the package "see" the modified file?

+3


source to share


1 answer


You can modify the existing kernel.
I modified the radial kernel return operator to make the change .. You can try with this



-1


source







All Articles