项目作者: mlr-org

项目描述 :
a faster arff parser
高级语言: R
项目地址: git://github.com/mlr-org/farff.git
创建时间: 2015-08-20T18:17:52Z
项目社区:https://github.com/mlr-org/farff

开源协议:Other

下载


farff: A faster ARFF parser.

CRAN Downloads
CRAN Status Badge
Build Status

This is a subproject for better file handling with mlr and OpenML.

Installation instructions

Please install the proper CRAN releases in the usual way.
If you absolutely have to install from here (you should not):

  1. devtools::install_github("mlr-org/farff")

What is ARFF

ARFF files are like CSV files, with a little bit of added meta information in a header and standardized NA values. They are quite often used for machine learning data sets and were introduced for the WEKA machine learning java toolbox.

RWeka’s read.arff and write.arff already exist?

Several reasons motivated the development of farff:

  • The java dependency of RWeka is annoying.
  • The I/O code in RWeka is pretty slow, at least the reading of files in farff is much faster.

How does it work?

  1. library(farff)
  2. # import arff format file
  3. d = readARFF("iris.arff")
  4. # export arff format file
  5. writeARFF(iris, path = "iris.arff")

How does it work under the hood?

  • We read the ARFF header with pure R code.
  • We preprocess the data section a bit with custom C code and write the result into a temporary file TEMP.
  • The TEMP file, i.e., the data section, is parsed with readr::read_delim. Support for data.table::fread is planned for future releases.