Orange Forum • View topic - Tab file format

Tab file format

A place to ask questions about methods in Orange and how they are used and other general support.

Tab file format

Postby pk0312 » Thu Mar 07, 2013 13:01

Hello,

I am having a problem getting .tab file the way it should be. I studied the datasets that come with Orange and read about .tab file format but still, when I open the file in Orange it says
'[..]/data.tab' is being loaded as .tab, but looks more like a .txt file (empty file)


Here is the file. Preview:
Code: Select all
ID   f1   f2   f3   f4   f5   f6   f7   f8   f9   f10
d   d   d   d   d   d   d   d   d   d   d
                                 
1000025   5   1   1   1   2   1   3   1   1   2
1002945   5   4   4   5   7   10   3   2   1   2
1015425   3   1   1   1   2   2   3   1   1   2


What am I missing?

Re: Tab file format

Postby re832003 » Thu Mar 07, 2013 13:09

Where is the class?

Re: Tab file format

Postby pk0312 » Thu Mar 07, 2013 13:13

The documentation says you dont need one:

c or class denotes a class attribute. There can be at most one such attribute; if there are none, the last attribute is the class.


I did try adding it though but I still get the error.

Re: Tab file format

Postby re832003 » Thu Mar 07, 2013 13:23

I ran it with SVM classifier and it worked.

(1) Line 666 has a problem which gives an error of "vector out of range"

(2) Add class attribute "class" or c at the third row and don't leave it empty; this gives a ValueError: Test dataset without class attributes.

(3) Re-save the file as .tab from the file type drop menu you have in your text editor.

I hope that helps.

Re: Tab file format

Postby pk0312 » Thu Mar 07, 2013 13:44

First off, thanks for you help!

I did remove the line 666 (funny number :)), added the "c" in the third line and saved as .tab but I still get the same error.
Since you already fixed it - could you just paste it to patebin?

Re: Tab file format

Postby Ales » Thu Mar 07, 2013 14:18

pk0312 wrote:What am I missing?
Your file seems to be encoded using UTF-16. You should use plain ASCII (or UTF-8 if necessary))

Re: Tab file format

Postby pk0312 » Thu Mar 07, 2013 15:32

Thank you Ales, that was the problem!


Return to Questions & Support



cron