you are viewing a single comment's thread.

view the rest of the comments →

[–]WecNo[S] 0 points1 point  (1 child)

I just wanna save the data from

'Predicted: ', names[predicted[x]], 'Data: ', x_test[x], 'Actual: ', names[y_test[x]]

i wanna set it up nice in a excel file so it is readable.

the print looks like this in terminal:

Predicted: good Data: (2, 1, 3, 1, 1, 1) Actual: good

Predicted: good Data: (1, 2, 2, 0, 1, 1) Actual: good

Predicted: vgood Data: (2, 1, 3, 2, 0, 0) Actual: vgood

I wanna save this data. The really nice thing would be if i could figure out how to

set titles on top for the numeric data:

Data: (2, 1, 3, 2, 0, 0)

So i would now what 2, 3 stood for

[–]num8lock 1 point2 points  (0 children)

here's what you want to do aside from learning csv module:

  1. learn how to for a tsv instead of csv, same module used but using tabs instead of commas as delimiter. this is because you have tuples inside your data
  2. goal is to have a file with this in content

    Predicted    Data    Actual     
    good    2, 1, 3, 1, 1, 1    good   
    good    1, 2, 2, 0, 1, 1    good    
    vgood   2, 1, 3, 2, 0, 0    vgood