Feature engineering for LIBSVM in Python