Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
@RELATION abalone

@ATTRIBUTE sex REAL
@ATTRIBUTE length REAL
@ATTRIBUTE diameter REAL
@ATTRIBUTE height REAL
@ATTRIBUTE wholeWeight REAL
@ATTRIBUTE shuckedWeight REAL
@ATTRIBUTE visceraWeight REAL
@ATTRIBUTE shellWeight REAL
@ATTRIBUTE rings REAL
@ATTRIBUTE class { Male,Female,Infant }


@DATA
M,0.455,0.365,0.095,0.514,0.2245,0.101,0.15,15
M,0.35,0.265,0.09,0.2255,0.0995,0.0485,0.07,7
F,0.53,0.42,0.135,0.677,0.2565,0.1415,0.21,9
M,0.44,0.365,0.125,0.516,0.2155,0.114,0.155,10
I,0.33,0.255,0.08,0.205,0.0895,0.0395,0.055,7
I,0.425,0.3,0.095,0.3515,0.141,0.0775,0.12,8
F,0.53,0.415,0.15,0.7775,0.237,0.1415,0.33,20
F,0.545,0.425,0.125,0.768,0.294,0.1495,0.26,16
M,0.475,0.37,0.125,0.5095,0.2165,0.1125,0.165,9
F,0.55,0.44,0.15,0.8945,0.3145,0.151,0.32,19

What I have tried:

Whenever opening this file in weka constantly receive errors 'not recognised as an 'Arff data files' file. Reason: number expected, read Token[M], line 16. However whenever I try to rectify an error another would pop up. New to this and so would anyone know where I seem to be making the mistake. Appreciate the help.
Posted
Updated 20-Feb-20 4:30am

1 solution

@ATTRIBUTE sex REAL

@DATA
M,0.455,0.365,0.095,0.514,0.2245,0.101,0.15,15

You have declared column 1 (Sex) as a REAL type, but your data uses a character type. I have never heard of Weka or ARFF but found the information quite easily at Arff stable - Weka Wiki[^].

[edit]
Also you have a final ATTRIBUTE
@ATTRIBUTE class { Male,Female,Infant }

But no corresponding column in your data.
[/edit]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900