Tutorial for Static Interfaces

SHOGUN provides "static" interfaces to Matlab(tm), R, Python, Octave and provides a command line stand-a-lone executable. The idea behind the static interfaces is to provide a simple environment just enough to do simple experiments. For example, it will allow you to train and evaluate a classifier but not go beyond that. In case you are looking for basically unlimited extensibility (multiple methods like classifiers potentially sharing data and interacting) you might want to look at the Modular Interfaces instead.

In this tutorial we demonstrate how to use shogun to create a simple gaussian kernel based svm classifier:

% LibSVM
print LibSVM

set_kernel GAUSSIAN REAL 10 1.2
set_features TRAIN ../data/fm_train_real.dat
set_labels TRAIN ../data/label_train_twoclass.dat
new_svm LIBSVM
svm_epsilon 1e-5
svm_use_bias 0
c 0.017

init_kernel TRAIN
train_classifier
save_classifier libsvm.model

load_classifier libsvm.model LIBSVM
set_features TEST ../data/fm_test_real.dat
init_kernel TEST
out.txt = classify

SHOGUN Machine Learning Toolbox - Documentation