Skip to content
Prev 238867 / 398500 Next

SVM classification based on pairwise distance matrix

Hi,
On Thu, Oct 21, 2010 at 12:12 PM, Martin Tomko <martin.tomko at geo.uzh.ch> wrote:
Well, it's not clear to me what type of data you are working with. You
say they are "graphs of sort." There are "principled" ways of working
with graphs in SVMs -- namely using "graph kernels". You can find
information about them if you run through google (Karsten Borgwadt
does a lot of work in this area). Unfortunately, I don't think there
are any public-domain implementations out there for you to consume
easily.

But still -- you're able to calculate a distance metric over your data
-- how are you doing that?

Here's a shot at the dark, and probably not so correct, but read at
your own risk:

What if you try to create a kernel matrix by plugging your distance
metric into the appropriate place from something like an RBF kernel
function. For instance, the value of the RBF kernel between two points
is:

exp(-|X_1 - X_2|^2 / sigma^2)

What if you plugged your distance measure between samples X_1 and X_2
into the |X_1 - X_2| slot and kept the rest the same?

You have to verify that this is a valid kernel (gram) matrix -- I
think it just needs to be symmetric positive definite. See a quick
review here:
http://www.support-vector.net/icml-tutorial.pdf

Now your just left to figure out how to use ksvm (from kernlab) with
kernel matrices and maybe you have something that can work.