Message: "Unable to determine structure as arff"!! Screenshots attached!

2,019 views
Skip to first unread message

Abdo Shalaby

unread,
Oct 29, 2013, 11:34:32 AM10/29/13
to wekamooc...@googlegroups.com
Hi, 

First thanks for the nice course and the certificate. 

Now, I started to work on actual application to apply associate rule for transactions-products db. So, I get related products.

When I tried to upload the data set for WEKA, I faced error message with this message : "Unable to determine structure as arff", screenshot attached.

I have struggled with this issue for 3 hours and it doesn't work!! I don't know why!!

I appreciate your help. 

Thanks!
Abdo
arff-dataset.PNG
error message.PNG

Peter Reutemann

unread,
Oct 29, 2013, 3:59:30 PM10/29/13
to WekaMOOC
Hi Abdo

> Now, I started to work on actual application to apply associate rule for
> transactions-products db. So, I get related products.
>
> When I tried to upload the data set for WEKA, I faced error message with
> this message : "Unable to determine structure as arff", screenshot attached.
>
> I have struggled with this issue for 3 hours and it doesn't work!! I don't
> know why!!

Since the MOOC has closed, you should post any further questions
regarding Weka to the Weka mailing list. See Weka homepage for
details.

According to the error message, you didn't seem to close the list of
nominal values correctly ("} expected at end of enumeration" in line
4). Do you, by accident, introduced a new line inside the long list of
values?

You seem to be constructing the dataset by hand, which is usually
error prone. You could always just declare nominal attributes
temporarily as "STRING" (rather than listing all the values) and then
use the StringToNominal filter to convert them into nominal ones.

Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cms.waikato.ac.nz/~fracpete/ Ph. +64 (7) 858-5174

Abdo Shalaby

unread,
Oct 30, 2013, 12:26:49 AM10/30/13
to wekamooc...@googlegroups.com
Hi Peter, 

Thanks for your reply. I will post further questions on the mailing list. 

Its closed with }. But sorry the screenshot didn't show that because it was for the part of the file. 

Yes, there is lines inside the dataset. 

I have attached the data set with this message. So, it become easier for you to find the reason. 

Thanks!
Abdo

transactionsIds_productsSku_weka.arff

Peter Reutemann

unread,
Oct 30, 2013, 12:29:33 AM10/30/13
to WekaMOOC
> Its closed with }. But sorry the screenshot didn't show that because it was
> for the part of the file.
>
> Yes, there is lines inside the dataset.

That's your problem. The ARFF format requires you to specify an
attribute on a single line.

Abdo Shalaby

unread,
Oct 30, 2013, 12:32:33 AM10/30/13
to wekamooc...@googlegroups.com, frac...@waikato.ac.nz
Okay, great!

Do you know any tool I can edit the file to remove the new lines? 

Its downloaded automatically with lines new from Google analytics.

Abdo Shalaby

unread,
Oct 30, 2013, 1:22:31 AM10/30/13
to wekamooc...@googlegroups.com
Another note, while working with this issue, I checked WEKA default datasets, I found some attributes declared on more than one line. 

For example, at soybean data set, fruit-spots attribute defined in 2 lines.

Peter Reutemann

unread,
Oct 30, 2013, 2:30:57 AM10/30/13
to WekaMOOC


> Its downloaded automatically with lines new from Google analytics.

As far as I know, Google Analytics exports CSV and not ARFF. Just re-download the CSV and load that in the Explorer.

Cheers, Peter

Abdo Shalaby

unread,
Oct 30, 2013, 8:11:26 AM10/30/13
to wekamooc...@googlegroups.com
Hi Peter, 

I have removed the lines from the ARFF file and it also didn't work!! 

I have attached it so you can check yourself. 

I will appreciate your help with this situation

Thanks!
Abdo
transactionsIds_productsSku_mostafa.arff

Peter Reutemann

unread,
Oct 30, 2013, 3:52:33 PM10/30/13
to WekaMOOC
> I have removed the lines from the ARFF file and it also didn't work!!

Yes, because you removed *all* line feeds from the file, rather than
just the ones inside the enumeration for nominal attributes.

See the ARFF file format page on the wiki:
http://weka.wikispaces.com/ARFF+%28stable+version%29

Either use CSV or use the STRING approach that I mentioned earlier.

That was my final reply.

Abdo Shalaby

unread,
Oct 30, 2013, 10:16:08 PM10/30/13
to wekamooc...@googlegroups.com
Thank you Peter!  

It works now!


On Tuesday, October 29, 2013 11:34:32 PM UTC+8, Abdo Shalaby wrote:
Reply all
Reply to author
Forward
0 new messages