JSON interface

JSON is the JavaScript Object Notation, a standard de facto when exchanging data in WEB. Its main characteristics is that it is easily readable by humans, and can be composed in an efficient way.

KeLP completely supports a JSON serialization/deserialization of objects, in particular kernels and algorithms. We decided to provide a JSON interface to help those users that are not familiar with programming languages, or for those users that know other programming languages and are not familiar with Java. In fact, for the first class of users, JSON is easily readable and can be written without any programming skill. The second class of users can leverage on well-estabilished JSON library in their preferred language.

In the next snippet of code a One-Vs-All learning algorithms based on a kernel implementation of the Passive Aggressive algorithms is provided in the JSON language. It can be noticed that a kernel combination between two kernel functions is described. Finally, the labels of the multiclassification process are listed.

The previous JSON description can be simply loaded in Java, with three lines of code.

Moreover, JSON serialization/deserialization allows to build Web Services that can be used to build remote learners and classifiers that are completely general purpose. In fact, all the design of KeLP is transparent with respect to the specific implementations of kernel functions or algorithms.