Skip to content

fsvbach/kernel-methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Challenge

To run our experiments, execute

python3 experiments.py

in this folder. Note, that only a representative sample experiment is submitted. However, any expirement we did throughout the challenge can be expressed in a succinct manner using the versatile util.cross_validation function. It takes as input three arrays representing different models, kernels and training data respectively. util.cross_valdiation outputs a scores object that can be plotted using the util.plot_cross_val function. To classify test data use util.save_predictions.

For a usage sample see experiments.py. The repository contains cached kernel matrices for the Mismatch kernel with k=10 and k=12 (m=4 in both cases).

Build C++ libary

For the weighted degree kernel we implemented the computation of kernel function in C++. To compile the c++ code, such that they can be called form our pyhton code execute (in project root):

g++ -c -fPIC Code/c-functions/kernel-functions.cpp -Wextra -Wall -o Code/c-functions/fun.o && g++ -shared -Wl,-soname,Code/c-functions/kernel-functions.so -o Code/c-functions/kernel-functions.so Code/c-functions/fun.o

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published