ARCHIVE Snapshot of the Rätsch lab website (Tübingen, then New York) as of February 2016: preserved, not maintained. The group today: bmi.inf.ethz.ch
Personal tools

Live Demonstration Material

Tasks

During the tutorial we will show a live demonstration which can be repeated by anybody who's bringing his laptop computer and has internet access. We will try to solve the following two tasks either using a webservice or command line tools (Linux and Mac OS X only):

  • Task 1: Learn to classify acceptor splice sites with GC-content and sequence features and evaluate performance
  • Task 2: Determine the best combination of polynomial degree d=1,...,5 and SVM's C=0.1,1,10 using 5-fold cross-validation

Data

The data used in the life demonstration is available at: http://svmcompbio.tuebingen.mpg.de/data (the files C_elegans_acc_seq.arff and C_elegans_acc_gc.arff will be used).

Webservice

A web service for using SVMs, using predefined kernels for real-valued data and string classification (based on Easysvm) is available at: http://galaxy.raetschlab.org

Steps for Task 1:

  1. Use Upload file with URL http://svmcompbio.tuebingen.mpg.de/data/C_elegans_acc_gc.arff; set file format to ARFF and upload; file appears in history on right; to check the content, click on the eye
  2. Use Train and Test SVM on uploaded data set (choose ARFF data format) tool; set experimental protocol to Train using cross-validation, the kernel to linear, execute and check the result
  3. Use Evaluate Predictions on predictions and the labeled data (choose ARFF format), select ROC Curve and execute; check out the evaluation summary and the ROC curves

If you just want to see the result, please import the history here.

Repeat these steps with file http://svmcompbio.tuebingen.mpg.de/data/C_elegans_acc_seq.arff and the Spectrum or Weighted Degree kernel (import history here).

Steps for Task 2:

  1. Reuse the uploaded file from Task 1.
  2. Use SVM Model Selection with uploaded data (choose ARFF format), set the number of cross-validation rounds to 5, set Cs as 0.1,1,10, select the polynomial kernel and choose the degrees as 1,2,3,4,5. Execute and check the results. Which is the best combination of C and degree?

If you just want to see the result, please import the history here

Repeat these steps with file http://svmcompbio.tuebingen.mpg.de/data/C_elegans_acc_seq.arff and the Spectrum or Weighted Degree kernel (import history here).

EasySVM

The above tasks can also be solved using command line tools (Linux and Mac OS X only). We need a few steps of preparation, before we can start.

Preparation

As a prerequisite, please make sure that you have python (2.4 or 2.5; 2.6 untested) and numpy (version >=1.0.1) installed. Also install pylab, if you like graphical output.

easySVM is based on the shogun toolbox which needs to be installed first. To install shogun to the directory mylibs in your home directory, please follow these steps (only available under Linux or Mac OS X) :

wget http://shogun-toolbox.org/archives/shogun/releases/0.7/sources/shogun-0.7.3-tut.tar.bz2 && tar xjf shogun-0.7.3-tut.tar.bz2
cd shogun-0.7.3/src && ./configure --interfaces=python_modular,libshogun,libshogunui --prefix=~/mylibs && make && make install && cd ../..

To install easySVM in the same directory follow these steps:

wget https://fml.ratschlab.org/suppl/easysvm/releases/easysvm-0.3.1.tar.gz && tar xzf easysvm-0.3.1.tar.gz
cd easysvm-0.3.1 && python setup.py install --prefix=~/mylibs && cd ..
wget http://svmcompbio.tuebingen.mpg.de/data/C_elegans_acc_gc.arff http://svmcompbio.tuebingen.mpg.de/data/C_elegans_acc_seq.arff

Hint: If you have multiple python installations (often the case on a Mac), then you may need to edit the first line in the files ~/mylibs/bin/easysvm.py and ~/mylibs/bin/datagen.py to use the correct version of python.

Attention: Please make sure set the following environment variables before you try to run easySVM (you may add these lines to your ~/.bashrc):

export PYTHONPATH=~/mylibs/lib/python2.5/site-packages
export LD_LIBRARY_PATH=~/mylibs/lib
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH  # only required for Mac OS X

Steps for Task 1

  • Linear Kernel with GC-features:
~/mylibs/bin/easysvm.py cv 5 1 linear arff C_elegans_acc_gc.arff lin_gc.out
head -4 lin_gc.out
~/mylibs/bin/easysvm.py eval lin_gc.out arff C_elegans_acc_gc.arff lin_gc.perf
tail -6 lin_gc.perf
  • Spectrum kernel with sequences
~/mylibs/bin/easysvm.py cv 5 1 spec 6 arff C_elegans_acc_seq.arff spec_seq.out
~/mylibs/bin/easysvm.py eval spec_seq.out arff C_elegans_acc_seq.arff spec_seq.perf
tail -3 spec_seq.perf
  • Weighted Degree kernel with sequences
~/mylibs/bin/easysvm.py cv 5 1 WD 6 0 arff C_elegans_acc_seq.arff wd_seq.out
~/mylibs/bin/easysvm.py eval wd_seq.out arff C_elegans_acc_gc.arff wd_seq.perf
tail -3 wd_seq.perf

Steps for Task 2

~/mylibs/bin/easysvm.py modelsel 5 0.1,1,10 poly 1,2,3,4,5 true false arff C_elegans_acc_gc.arff poly_gc.modelsel
head -8 poly_gc.modelsel
Document Actions