PDA

View Full Version : Error in loading a arff file into Weka explorer



france
12-06-2007, 12:10 PM
Hi everybody,

First of all sorry for asking a beginners question here. I have tried sincerely and could not figure it out so came here to find where I am getting it wrong.
I have a data in excel sheet whcih I have converted into a *.arff file format.
But while trying to load that arff file in explorer i have an error message as follwos,

"File Myfile.arff not recognised as an arff file,
Reason:
No valid attribute type or invalid enumeration, read Token[to], line 5"

Here is the texual content of my arff file pasted below.

@relation Myfile

@attribute T{Bug, Improvement}
@attribute Title string
@attribute Assigned to {Project, ‘BOCKMANN M.’, ‘BURHENN J’}
@attribute Reported by {Tester, ‘WISE J.’}
@attribute Sv {Fatal, Critical, Major, Minor, Trivial}
@attribute Pr {Undefined, Low, Medium, High}
@attribute St {Assigned, Resolved}
@attribute Resolution {Unresolved, Fixed, Won’t be fixed, Cannot reproduce, Not
a bug}
@attribute Created on date
@attribute Updated on date



@data
Bug;;Recovery - Rescue Disk - Partitioning - Restore Master Boot Record causes
the drive to become unbootable.;HSIA_A.;BUDD
K.;Fatal;Undefined;Assigned;Unresolved;;11/23/2006;12/01/2006
Bug;;Optimizer - SizeManager - File / Folder / Move To function not moving the
folder.;Project;BUDD
K.;Trivial;Undefined;Assigned;Unresolved;;09/04/2006;9/13/2006

Any reposnse with the solution is appreciated,
Thanks,
Raj

Mark
12-06-2007, 05:11 PM
Hi there,

First of all ypu need to make sure that anything (attribute name, nominal attribute value etc.) that contains a space is enclosed in quotes. So the error reported is related to the fact that Weka thinks the name of the third attribute is "Assigned" and then it doesn't understand "to" that follows it. Change to "Assigned to" (including the quotes). Do the same for the rest of the attributes and any values that have a space in them.

Secondly, Weka expects fields to be separated by commas.

Cheers,
Mark.

france
12-10-2007, 09:38 AM
Thank you Mark for ur response.
But I am seeing another error message now after makinf the suggested changes.

Now the error message is

File 'Myfile.arff' not recognised as an arff file.

Reason:

Unparseable data: 2006-11-23, read token[2006-11-23], line15
Here is the text content of arff file.

@RELATION Myfile

@ATTRIBUTE T{Bug, Improvement}
@ATTRIBUTE Title string
@ATTRIBUTE Assigned {Project, HSIA, BURHENN}
@ATTRIBUTE Reported {Tester, BUDD}
@ATTRIBUTE Sv {Fatal, Critical, Major, Minor, Trivial}
@ATTRIBUTE Pr {Undefined, Low, Medium, High}
@ATTRIBUTE St {Assigned, Resolved}
@ATTRIBUTE Resolution {Unresolved, Fixed, “Won’t be fixed”, “Cannot reproduce”, “Not a bug”}
@ATTRIBUTE Created DATE “yyyy-MM-dd” {2006-1-23, 2006-12-01}
@ATTRIBUTE Updated DATE “yyyy-MM-dd”

@DATA
Bug,RecoveryBug,HSIA,BUDD,Fatal,Undefined,Assigned,Unresolved,2006-11-23,2006-12-01

I understand that it is an error with my date but i still am trying to set it right by trail and error and till now could not find it.

france
12-10-2007, 11:43 AM
Ok got it finally. ;)

My quotes for the DATE string were of the wrong font.
I found by trial and error.