ARFF file in WEKA

Source: Internet
Author: User

The ARFF file format used in WEKA is divided into two parts: header and data. The header is used to define the relation name and a series of attribute names and types, such:

   @RELATION iris    @ATTRIBUTE sepallength  NUMERIC   @ATTRIBUTE sepalwidth   NUMERIC   @ATTRIBUTE petallength  NUMERIC   @ATTRIBUTE petalwidth   NUMERIC   @ATTRIBUTE class        {Iris-setosa,Iris-versicolor,Iris-virginica}

Data, as its name implies, is data. The attribute sequence must be consistent with the sequence defined by the header. If the value is null, use? Different attribute values are separated by commas (,). The comma can be followed by several spaces. The format is as follows:

   @DATA   5.1,3.5,1.4,0.2,Iris-setosa   4.9,3.0,1.4,0.2,Iris-setosa   4.7,3.2,1.3,0.2,Iris-setosa   4.6,3.1,1.5,0.2,Iris-setosa   5.0,3.6,1.4,0.2,Iris-setosa   5.4,3.9,1.7,0.4,Iris-setosa   4.6,3.4,1.4,0.3,Iris-setosa   5.0,3.4,1.5,0.2,Iris-setosa   4.4,2.9,1.4,0.2,Iris-setosa   4.4,?,1.5,?,Iris-setosa

@ Relation, @ attribute, and @ data are not case sensitive. All strings (names or values) in the ARFF file must be enclosed in quotation marks if spaces exist in the middle.

Attribute supports the following data types:

1. Numeric

2. Real (as numeric)

3. INTEGER (as numeric)

4. String

5. Enumeration type

6. Date [<date-format>]

The keywords numeric, real, integer, string, and date of these data types are not case sensitive. The enumerated type follows the range of optional values after the attribute name is defined, and is enclosed in curly brackets. Date type if not specified format default format defined by ISO-8601: yyyy-mm-dd
Hh: mm: Ss. to specify a specific format, specify the format after date. The format is the same as that specified by Java. Text. simpledateformat.


The data value is case-sensitive. The date value must be the same as the specified format.


Refer:

Http://weka.wikispaces.com/ARFF+%28book+version%29

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.