What is the ARFF file format?
An .arff file is the native dataset format for the Weka machine learning workbench, developed by the Machine Learning Group at the University of Waikato. It stores labeled datasets as plain text with a structured schema header, making it a common interchange format in academic machine learning research.
An .arff file has two sections. The header begins with @relation (naming the dataset), followed by @attribute declarations defining each feature's name and type. Supported types include NUMERIC, INTEGER, REAL, STRING, DATE (ISO 8601), and nominal (an explicit value list in curly braces {}). The @data section follows with comma-separated instances, one per line; missing values are marked ?. Lines beginning with % are comments.
A sparse variant uses {index value} pairs for high-dimensional datasets where most values are zero - common in text classification. The @relational attribute type supports nested sub-datasets for multi-instance learning.
Despite its age, .arff is widely supported beyond Weka: Python reads it via scipy.io.arff.loadarff(), R handles it with the foreign package, and many ML toolkits accept it as an interchange format. For richer metadata and per-instance weights, Weka's XML-based .xrff is the successor, though .arff and .csv remain more common in practice.
Security & safety
RISK: LOWPlain text data file; no executable content. Safe to open in any text editor. Weka processes it in a JVM sandbox.
Format details
in a nutshellPrograms that open ARFF files
Technical details
deep spec| Encoding | Plain text (ASCII historically; UTF-8 in modern Weka) |
| File structure | Header (@relation + @attribute declarations) followed by @data section |
| Attribute types | NUMERIC, INTEGER, REAL, STRING, DATE, NOMINAL (curly-brace value list), RELATIONAL |
| Missing value token | ? represents any missing value in the @data section |
| Comment syntax | Lines beginning with % are comments; allowed anywhere in the file |
| Sparse ARFF variant | {index value} pairs in @data section for high-dimensional sparse datasets |
| Date attribute format | ISO 8601 date/time strings within DATE attribute declarations |
| Nested data support | @relational attribute type encodes sub-datasets for multi-instance learning |
| MIME type | text/plain (no dedicated MIME type registered) |
| Typical file size | 1 KB - 500 MB (benchmark datasets commonly 1-50 MB) |
| Python support | scipy.io.arff.loadarff() in SciPy; standalone arff package on PyPI |
| R support | read.arff() in the foreign package |
| XML-based successor | XRFF format adds instance weights and richer dataset metadata |
| Platform | Cross-platform: Windows, Linux, macOS |
| Released | 1993 (Weka project, University of Waikato) |
| Latest version | ARFF with relational attributes (Weka 3.x, extended ~2005) |
| Open standard | Yes · royalty-free |
| Specification | waikato.github.io |
ARFF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about ARFF files.