1. A computer implemented method of generating a kernel function comprising: by a computer: inputting a training data set and a set of pre-specified base similarity functions; combining the input base similarity functions by: constructing a new space of K-instances from pairs of training instances such that the K-instances are constructed from the pre-specified similarity functions; and outputting an indication of the generated kernel function so generated, wherein said kernel function is generated from the K-instance training set by: determining a binary scoring rule H from the K-training set; determining a new kernel function K* from H as follows: 
 K *( X,X ′)= H ( Zx,x ′)= H ([ K 1( X,X ′), K 2( X,X ′),. .. , Kp ( X,X ′)]).