title: using precomputed kernels with libsvm
body: <p>I'm currently working on classifying images with different image-descriptors. Since they have their own metrics, I am using precomputed kernels. So given these NxN kernel-matrices (for a total of N images) i want to train and test a SVM. I'm not very experienced using SVMs though. </p>
  
  <p>What confuses me though is how to enter the input for training. Using a subset of the kernel MxM (M being the number of training images), trains the SVM with M features. However, if I understood it correctly this limits me to use test-data with similar amounts of features. Trying to use sub-kernel of size MxN, causes infinite loops during training, consequently, using more features when testing gives poor results.</p>
  
  <p>This results in using equal sized training and test-sets giving reasonable results. But if i only would want to classify, say one image, or train with a given amount of images for each class and test with the rest, this doesn't work at all.</p>
  
  <p>How can i remove the dependency between number of training images and features, so i can test with any number of images?</p>
  
  <p>I'm using libsvm for MATLAB, the kernels are distance-matrices ranging between [0,1].</p>