Consider reading our published paper before playing with the code.
- g++
- make
- python 2.7x
- libsqlite3
The only software that needs to be compiled is LIBSVM.
- Go to
/path/to/rasvm/lib/libsvm-ext/
directory, and typemake
.
- Put your data inside
/path/to/rasvm/data/
directory. - Adjusts the global parameters inside the file
rasvm.py
to fit yours needs. - Go to
/path/to/rasvm/
directory, and run the Risk Area SVM with:- For a custom split:
python rasvm.py data/dataset/training.data data/dataset/testing.data
. - For a random 5x2cv:
python rasvm.py data/dataset/all.data
.
- For a custom split:
- The results will be saved under
/path/to/rasvm/results/
directory.
- Your data needs to be in the LIBSVM format. You can use this to convert CSV data to LIBSVM format.
- Your can save time by properly setting the global parameter
nr_local_worker
parameter inside the filerasvm.py
. This sets the number of processes to be executed in parallel. - The positive class must be denoted by the label 1. The other labels will be automatically converted to -1 and considered as negative.
- The data is automatically scaled to [-1, 1].