TWiki> Kernel Web>KernelQuickTour (revision 1)EditAttach

OpenKernel Quick Tour

Warning, important Under construction.

Using the library

In this quick tour, we will focus on the command-line utilities and libsvm plugin. The command-line utilities are available in the bin sub-directory.

Creating an n-gram kernel

$ klngram -order=3 -sigma=2  fst.list > 3-gram.kar

In addition to n-gram kernels, the library provides tools for the creation of gappy n-gram kernels, mismatch kernels and arbitrary rational kernels.

Generating a kernel matrix

$ kleval 3-gram.kar > 3-gram.matrix

Using the libsvm plugin

The OpenKernel library package includes a modified version of libsvm that allows the definition of arbitrary plugins to handle the kernel computations. This version of libsvm is available in the libsvm sub-directory. A specific plugin to allow the use of the OpenKernel library with libsvm is provided in the plugin sub-directory.

$ svm-train -k kernellib -K 3-gram.kar train 3-gram.model
$ svm-predict test 3-gram.model 3-gram.pred

-- CyrilAllauzen - 08 Oct 2007

Edit | Attach | Watch | Print version | History: r11 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2007-10-08 - CyrilAllauzen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback