Libsvm format transformation. The input matrix should like , ,...,; after conduct transformation the output would be like : : ...