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
28
votes
5 answers

How to read .arff file with R?

Is there any way to do that? Yes, i'm new to R.
Ilya Smagin
  • 5,992
  • 11
  • 40
  • 57
16
votes
2 answers

Arff Loader : AttributeError: 'dict' object has no attribute 'data'

I am trying to load a .arff file into a numpy array using liac-arff library. (https://github.com/renatopp/liac-arff) This is my code. import arff, numpy as np dataset = arff.load(open('mydataset.arff', 'rb')) data = np.array(dataset.data) when…
Erdnase
  • 750
  • 3
  • 12
  • 25
13
votes
5 answers

.arff files with scikit-learn?

I would like to use an Attribute-Relation File Format with scikit-learn to do some NLP task, is this possible? How can use an .arff file with scikit-learn?
tumbleweed
  • 4,624
  • 12
  • 50
  • 81
11
votes
2 answers

writing a fast parser in python

I've written a hands-on recursive pure python parser for a some file format (ARFF) we use in one lecture. Now running my exercise submission is awfully slow. Turns out by far the most time is spent in my parser. It's consuming a lot of CPU time, the…
panzi
  • 7,517
  • 5
  • 42
  • 54
10
votes
2 answers

How to convert the arff object loaded from a .arff file into a dataframe format?

I was able to load the .arff file using the following commands. But I was not able to extract the data from the object and convert the object into a dataframe format. I need this to do apply machine learning algorithms on this…
Thomas John
  • 101
  • 1
  • 1
  • 5
9
votes
2 answers

ARFF for natural language processing

I'm trying to take a set of reviews, and convert them into the ARFF format for use with WEKA. Unfortunately either I completely misunderstand how the format works, or I'll have to have an attribute for ALL possible words, then a presence indicator.…
Dean Barnes
  • 2,252
  • 4
  • 29
  • 53
9
votes
2 answers

ImportError: No module named arff

Here's a simple code as in this link to read an arff file in python (the commented one didn't work too): import arff for row in arff.load('heart_train.arff'): print(row.sex) And here's the error I receive: python id3.py Traceback…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
8
votes
2 answers

How to represent text for classification in weka?

Can you please let me know how to represent attribute or class for text classification in weka. By using what attribute can I do classification? word frequency or just word? What would be possible structure of ARFF format? Can you give me several…
Warren
  • 795
  • 1
  • 10
  • 19
8
votes
3 answers

Creating an ARFF file from python output

gardai-plan-crackdown-on-troublemakers-at-protest-2438316.html': {'dail': 1, 'focus': 1, 'actions': 1, 'trade': 2, 'protest': 1, 'identify': 1, 'previous': 1, 'detectives': 1, 'republican': 1, 'group': 1, 'monitor': 1, 'clashes': 1, 'civil': 1,…
jenniem001
  • 596
  • 1
  • 5
  • 16
8
votes
6 answers

Train and test set are not compatible error in weka?

I'm trying to test my model with new dataset. I have done the same preprocessing step as i have done for building my model. I have compared two files but there is no issues. I have all the attributes(train vs test dataset) in same order, same…
Suren Raju
  • 3,012
  • 6
  • 26
  • 48
8
votes
3 answers

What is the meaning of jitter in visualize tab of weka

In weka I load an arff file. I can view the relationship between attributes using the visualize tab. However I can't understand the meaning of the jitter slider. What is its purpose?
Xolve
  • 22,298
  • 21
  • 77
  • 125
7
votes
3 answers

Using Weka Java Code - How Convert CSV (without header row) to ARFF Format?

I'm using the Weka Java library to read in a CSV file and convert it to an ARFF file. The problem is that the CSV file doesn't have a header row, only data. How do I assign attribute names after I bring in the CSV file? (all the columns would be…
Greg
  • 45,306
  • 89
  • 231
  • 297
7
votes
1 answer

The type FastVector is deprecated

I am trying to get arrf extended output file from a multidimensional array in Java. And I imported weka library, however I got an error; The type FastVector is deprecated. What can I use instead of FastVector and how I can rewrite the code…
EngineerEngin
  • 105
  • 1
  • 5
6
votes
1 answer

Simple text classification using naive bayes (weka) in java

I try to do text classification naive bayes weka libarary in my java code, but i think the result of the classification is not correct, i don't know what's the problem. I use arff file for the input. this is my training data: @relation…
6
votes
1 answer

How can I parse an arff file without using external libraries in Python

I need to parse an arff file like the following without using any external libraries. I am not sure how I can related the attributes to the numerical values. Like how can I say the first numerical value in each row is the age while the second one is…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
1
2 3
19 20