Questions tagged [arff]

An ARFF (Attribute-Relation File Format) file is an ASCII text file that describes a list of instances sharing a set of attributes

An ARFF (Attribute-Relation File Format) file is an ASCII text file that describes a list of instances sharing a set of attributes. ARFF files were developed by the Machine Learning Project at the Department of Computer Science of The University of Waikato for use with the Weka machine learning software

288 questions
5
votes
1 answer

Creating ARFF from word frequencies

I have some code that gives me a list of words with their frequencies that they occur in the text, I'm looking to make it so the code converts the top 10 words automatically into an ARFF with @RELATION wordfrequencies @ATTRIBUTE word…
Alex
  • 1,853
  • 5
  • 16
  • 15
5
votes
3 answers

exporting dataframe to arff file python

I am trying to export a pandas dataframe to .arff file to use it in Weka. I have seen that the module liac-arff can be used for that purpose. Going on the documentation here it seems I have to use arff.dump(obj,fp) Though, I am struggling with obj…
mina
  • 195
  • 1
  • 2
  • 14
5
votes
2 answers

Output weka results to text file

I am new to Weka GUI and i want to output a list of correlations on different fields to a .txt file. My arff file is correct. Can anyone help ? I have already managed it using the art writer with the api, but i can't seem to find from where using…
user4251864
  • 107
  • 1
  • 8
5
votes
2 answers

How do I transform text into TF-IDF format using Weka in Java?

Suppose, I have following sample ARFF file with two attributes: (1) sentiment: positive [1] or negative [-1] (2) tweet: text @relation sentiment_analysis @attribute sentiment {1, -1} @attribute tweet string @data -1,'is upset that he can\'t update…
5
votes
1 answer

Insert column at beginning of a data frame

How can I add a column to an R data.frame as a new first column so that all other columns are shifted by one column? Like: a|b|c --> new|a|b|c I need to do this because I want the row.names to become a discrete column. This is needed because the…
aldorado
  • 4,394
  • 10
  • 35
  • 46
5
votes
3 answers

Boolean attributes in Weka

Is it possible to implement boolean attributes in WEKA? I want to implement a market basket analysis and for this I need a table such Product_A Prod_B Yes No No Yes Yes Yes and so on. For No, or false, I can use ?, that stands…
mrbela
  • 4,477
  • 9
  • 44
  • 79
5
votes
2 answers

Add comment to an ARFF file

this is my first question in this forum.... I'm making adata-mining application in java with the WEKA API. I make first a pre-processing stage and when I save the ARFF file i would like to add a couple of lines (as comments) specifing the…
fran
  • 145
  • 1
  • 11
4
votes
1 answer

Using Weka on command line to generate cluster assignment arff file

On the explorer in weka you can perform clustering on data then use the visualisation to save a new arff file with the cluster assignments as attributes. Is there a way to do this automatically by calling executables on the command line?
Tom
  • 215
  • 1
  • 7
  • 19
4
votes
1 answer

How to use StringToWordVector (weka) in java?

This is my arff file @relation hamspam @attribute text string @attribute class {ham,spam} @data 'good',ham 'very good',ham 'bad',spam 'very bad',spam 'very bad, very bad',spam What i want to do is to classify it with weka clasiffier in my java…
4
votes
1 answer

Premature end of line in weka

I have some data inside arff file and I can't convert it. I don't know what is wrong. @RELATION relationName @ATTRIBUTE IP STRING @ATTRIBUTE data STRING @ATTRIBUTE adress STRING @ATTRIBUTE error_code STRING @ATTRIBUTE…
Marcin Erbel
  • 1,597
  • 6
  • 32
  • 51
4
votes
1 answer

Weka error opening arff file

I'm trying to open an arff file in weka but I get two errors. The first, "file not recognised as an arff file. Reason: nominal value not declared in header, read Token[25], line 772" The curious thing is that I delete the 25 element and try again,…
user2154826
4
votes
2 answers

Using HMM in Weka

I am using weka.classifiers.bayes.HMM to try to classify some of my data, but I can't seem to find any examples of exactly how my ARFF file should look like...the documentation wasn't really clear to me. So I understand that HMMs require…
4
votes
4 answers

How can I create an .arff file from .txt?

Is there any simple way to do that? I'm not in Java and I'm new in Python so I would need another way(s). Thanks in advance!
user1424341
  • 41
  • 1
  • 1
  • 2
3
votes
1 answer

Weka printing sparse arff file

I was trying out the sparse representation of the arff file as shown here. In my program I am able to print the the class label "B" but for some reason it is not printing "A". attVals = new FastVector(); attVals.addElement("A"); …
Fox
  • 9,384
  • 13
  • 42
  • 63
3
votes
4 answers

Counting bi-gram frequencies

I've written a piece of code that essentially counts word frequencies and inserts them into an ARFF file for use with weka. I'd like to alter it so that it can count bi-gram frequencies, i.e. pairs of words instead of single words although my…
Alex
  • 1,853
  • 5
  • 16
  • 15
1
2
3
19 20