Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Standalone programs

davidpicard edited this page · 1 revision

Although JkernelMachines is a library designed to be extended by the use of your own kernels, there are currently 2 standalone programs in JKernelMachines that can be launched out of the box.

The first one is fr.lip6.example.SVMExample which reads data from a file in libsvm format, split it in half, uses the first part for training an SVM with Gaussian kernel and the other half for evaluating the accuracy.

The second standalone program is aimed at computing accuracy using a cross-validation procedure. It is fr.lip6.example.CrossValidationExample

CrossValidationExample -f file [-p percent] [-n nbtests] [-k kernel] [-a algorithm] [-vvv]
    -f file: the data file in libsvm format
    -p percent: the percent of data to keep for training
    -n nbtests: the number of test to perform during crossvalidation
    -k kernel: the type of kernel (linear or gauss, default gauss)
    -a algorithm: type of SVM algorithm(lasvm, lasvmi, smo, default lasvm)
    -v: verbose (v few, vv lot, vvv insane, default none)

For example, you can run

java -cp jkernelmachines.jar fr.lip6.example.CrossValidationExample -f ionosphere_scale -p 0.7 -n 20 -k gaussl2 -a lasvmi

This assumes your data file is ionosphere_scale. 70% of data are kept for training. 20 random split are done for the crossvalidation. a Gaussian kernel is used with LaSVM-I algorithm.

The output should be something like

Accuracy: 0.8990566037735848 +/- 0.02878518170262708

You can find data in libsvm format here

Something went wrong with that request. Please try again.