Is there a script that converts tab delimited data file to libSVM data format? For example, my unlabeled data:
-1 9.45 1.44 8.90
-1 8.12 7.11 8.90
-1 8.11 6.12 8.78
and I would like to add each value with a label:
-1 1: 9.45 2: 1.44 3: 8.90
-1 1: 8.12 2: 7.11 3: 8.90
-1 1: 8.11 2: 6.12 3: 8.78
I believe this can be done with sed or awk, but I just don't know how to do it.
Thank!
source
share