0
votes

i want to convert the file in this link : http://archive.ics.uci.edu/ml/datasets/Credit+Approval to match weka .arff file and open it there.

i know that we need to define the file like:

@relation

@attribute

@data

i found the data, but didn't found the attributes! also the relation is the file name right ?

and one last thing how to make file extension .arff ?

please help. Thank You SO MUCH!!

2

2 Answers

0
votes

In crx.names from data folder, says : All attribute names and values have been changed to meaningless symbols to protect confidentiality of the data.

But they give you the values that they use:

Attribute Information:

A1:   b, a.
A2:   continuous.
A3:   continuous.
A4:   u, y, l, t.
A5:   g, p, gg.
A6:   c, d, cc, i, j, k, m, r, q, w, x, e, aa, ff.
A7:   v, h, bb, j, n, z, dd, ff, o.
A8:   continuous.
A9:   t, f.
A10:  t, f.
A11:  continuous.
A12:  t, f.
A13:  g, p, s.
A14:  continuous.
A15:  continuous.
A16: +,-         (class attribute)

You can give to this information, the meaning that you need.

For create this to arff file you write something like that:

%Test Data set

@relation Credit Approval Data Set 

@attribute attribute_name {a,b}
@attribute ...



@data
b,30.83,0,u,g,w,v,1.25,t,t,01,f,g,00202,0,+

Add the next attribute reading the credit.lisp, you need 16 attributes. Save the file how: name file.arff. You can create this file in a text editor of your preferred.

0
votes

If you want to follow GUI based approach then

1) open crx.data in any editor.

2) Add a column heading at the first line like:

A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,Class

3) Save the file as crx.csv

4) Open Weka -> Explorer

5) In preprocess tab -> Click on Open file

6) Change file type csv

7) Locate the file 'crx.csv`

8) Click on Save

9) Specify the file name crx.arff.

That's done.