<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr"><head><table cellpadding=0 cellspacing=0><tr><td><img src="icon:///24/import.png" /></td><td width="5"></td><td><h2 class="firstHeading" id="firstHeading">Read ARFF</h4></td></tr></table><hr noshade="true"></head>
<body class="mediawiki ltr ns-0 ns-subject page-Read_ARFF skin-monobook">
<div id="content">
	
	
	
	<div id="bodyContent">
		
		
		
		
<div id="synopsis">
<h4>
<span class="mw-headline" id="Synopsis">Synopsis</span>
</h4>
<p>
This operator can read arff files.
</p>
</div><br/><h4> <span class="mw-headline" id="Description"> Description </span>
</h4>
<p>
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.
</p>
<p>
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.
</p>
<p>
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.
</p>
<p>
The possible attribute types are:
</p>

<ul class="ports">
<li> <code>numeric</code>
</li>
<li> <code>integer</code>
</li>
<li> <code>real</code>
</li>
<li> <code>{nominalValue1,nominalValue2,...}</code> for nominal attributes
</li>
<li> <code>string</code> for nominal attributes without distinct nominal values (it is however recommended to use the nominal definition above as often as possible)
</li>
<li> <code>date [date-format]</code> (currently not supported by RapidMiner)
</li>
</ul>
<p>
Valid examples for attribute definitions are 

<code>@ATTRIBUTE petalwidth REAL</code> 

<code>@ATTRIBUTE class {Iris-setosa,Iris-versicolor,Iris-virginica}</code> 
</p>
<p>
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:

<code>4.4,?,1.5,?,Iris-setosa</code>
</p>
<p>
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.
</p>
<p>
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.
</p><br/><h4> <span class="mw-headline" id="Input"> Input </span>
</h4><br/><h4> <span class="mw-headline" id="Output"> Output </span>
</h4>

<ul class="ports">
<li> <b>output</b>:
</li>
</ul><br/><h4> <span class="mw-headline" id="Parameters"> Parameters </span>
</h4>

<ul class="ports">
<li> <b>data file</b>:  The path to the data file.
</li>
<li> <b>encoding</b>:  The encoding used for reading or writing files.
</li>
<li> <b>read not matching values as missings</b>:  Values which does not match to the specified value typed are considered as missings.
</li>
<li> <b>data set meta data information</b>:  The meta data information
</li>
<li> <b>attribute names already defined</b>:  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)
</li>
<li> <b>decimal character</b>:  The decimal character.
</li>
<li> <b>grouped digits</b>:  Parse grouped digits.
</li>
<li> <b>grouping character</b>:  The grouping character.
</li>
</ul><br/><h4> <span class="mw-headline" id="ExampleProcess"> ExampleProcess </span>
</h4><br/><div>
</div>
</body>
</html>
