LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 8 (http://book.caltech.edu/bookforum/forumdisplay.php?f=137)
-   -   HW8 Q2-6 Converting digit data to libsvm format (http://book.caltech.edu/bookforum/showthread.php?t=4428)

GB449 10-03-2013 11:56 AM

HW8 Q2-6 Converting digit data to libsvm format
 
I am not clear how to convert digit data ("digit symmetry intensity") to the libsvm format ("+/1 a:b c:d ...").

For e.g. for zero versus all will

0.0000000e+00 2.8954102e-01 -4.6441250e+00 from features.train

translate to

1 2.8954102e-01:-4.6441250e+00

Does anyone have transformed files for Qs 2 and 3 that I can use instead of writing a program to do the transformations?

Thanks!

Degutis 11-30-2018 01:34 AM

Re: HW8 Q2-6 Converting digit data to libsvm format
 
Quote:

Originally Posted by GB449 (Post 11518)
I am not clear how to convert digit data ("digit symmetry intensity") to the libsvm format ("+/1 a:b c:d ...").

For e.g. for zero versus all will

0.0000000e+00 2.8954102e-01 -4.6441250e+00 from features.train

translate to

1 2.8954102e-01:-4.6441250e+00

Does anyone have transformed files for Qs 2 and 3 that I can use instead of writing a program to do the last minute essay service transformations?


Thanks!

Hello GB449,

I used csv2libsvm.py to convert csv to libsvm data. Currently looking for the ways to convert dataframes to libsvm format. Have you tried to use dataset in grid.py as well?

Best,
R Degutis


All times are GMT -7. The time now is 11:46 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.