|  | ## Read ARFF

#### Synopsis

This operator can read arff files.

#### Description

This operator can read ARFF files known from the machine learning library Weka. 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.

ARFF files have two distinct sections. The first section is the Header information, which is followed the Data information. The Header of the ARFF file contains the name of the relation (@RELATION, ignored by RapidMiner) and a list of the attributes, each of which is defined by a starting @ATTRIBUTE followed by its name and its type.

Attribute declarations take the form of an orderd sequence of @ATTRIBUTE statements. Each attribute in the data set has its own @ATTRIBUTE statement which uniquely defines the name of that attribute and it's data type. The order the attributes are declared indicates the column position in the data section of the file. For example, if an attribute is the third one declared all that attributes values will be found in the third comma delimited column.

The possible attribute types are:

- `numeric`
- `integer`
- `real`
- `{nominalValue1,nominalValue2,...}` for nominal attributes
- `string` for nominal attributes without distinct nominal values (it is however recommended to use the nominal definition above as often as possible)
- `date [date-format]` (currently not supported by RapidMiner)

Valid examples for attribute definitions are `@ATTRIBUTE petalwidth REAL` `@ATTRIBUTE class {Iris-setosa,Iris-versicolor,Iris-virginica}`

The ARFF Data section of the file contains the data declaration line @DATA followed by the actual example data lines. Each example is represented on a single line, with carriage returns denoting the end of the example. Attribute values for each example are delimited by commas. They must appear in the order that they were declared in the header section (i.e. the data corresponding to the n-th @ATTRIBUTE declaration is always the n-th field of the example line). Missing values are represented by a single question mark, as in: `4.4,?,1.5,?,Iris-setosa`

A percent sign (%) introduces a comment and will be ignored during reading. Attribute names or example values containing spaces must be quoted with single quotes ('). Please note that the sparse ARFF format is currently only supported for numerical attributes. Please use one of the other options for sparse data files provided by RapidMiner if you also need sparse data files for nominal attributes.

Please have a look at the Iris example ARFF file provided in the data subdirectory of the sample directory of RapidMiner to get an idea of the described data format.

#### Input

#### Output

- output:

#### Parameters

- data file: The path to the data file.
- encoding: The encoding used for reading or writing files.
- read not matching values as missings: Values which does not match to the specified value typed are considered as missings.
- data set meta data information: The meta data information
- attribute names already defined: the parameter describes whether the attribute names were set by the user manually or were generated by the the reader (generic names or first row of the file)
- decimal character: The decimal character.
- grouped digits: Parse grouped digits.
- grouping character: The grouping character.

#### ExampleProcess