Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

classifying data from an ARFF in weka

Tags:

weka

arff

I have an ARFF that i've loaded into the weka explorer. I'm quite new to weka but to my understanding the arff i have should be working however none of the classifiers appear to work with it?

@RELATION wordfrequency

@ATTRIBUTE word string
@ATTRIBUTE frequency numeric

@DATA
allah,71
ye,65
day,46
lord,21
truth,20
say,20
and,20
the,19
return,19
it,19

Is there something i've missed adding to the arff file? Any help is appreciated. Thanks.

like image 903
Alex Avatar asked Jan 27 '26 16:01

Alex


1 Answers

you want to classify and where is the attribute for class? if you create an attribute class {c1,c2}. and filter your attributes in weka chose filter->unsupervised->attribute->Stringtovector and apply after this you can classify , it work with the naive bayes and other classifiers.

@RELATION wordfrequency
@ATTRIBUTE word string
@ATTRIBUTE frequency numeric
@ATTRIBUTE class {c1,c2}

@DATA

allah,71,c1
ye,65,c2
day,46,c1
lord,21,c2
truth,20,c1
say,20,c2
like image 158
WOW Avatar answered Jan 30 '26 18:01

WOW



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!