Rarff
(fork) A Ruby library for handling ARFF files, as popularized by the WEKA machine learning program
Install / Use
/learn @wwood/RarffREADME
rarff
DESCRIPTION:
Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files. ARFF files are used to specify data sets for data mining and machine learning. This library can generate ARFF files from Ruby Arrays of Arrays.
FEATURES
- Missing values - '?' are handled in creation of ARFF files
PROBLEMS
- Spaces or quotes in nominal types
- Commas can cause problems in attribute names, but should work within individual instances
- Error checking/validation
- Creation of sparse ARFF files
- Dates - create, translate, and interpret date format strings.
SYNOPSIS:
require 'wwood-rarff'
rel = Rarff::Relation.new('MyCoolRelation')
rel.instances = [ [1.4, 'foo bar', 5, 'baz', "1900-08-08 12:12:12"],
[20.9, 'ruby', 46, 'roc,ks', "2005-10-23 12:12:12"],
[0, 'ruby', 46, 'rocks', "2001-02-19 12:12:12"],
[68.1, 'stuff', 728, 'is cool', "1974-02-10 12:12:12"]]
rel.attributes[1].name = 'subject'
rel.attributes[4].name = 'birthday'
rel.attributes[4].type = 'DATE "yyyy-MM-dd HH:mm:ss"'
rel.to_arff
generates the String
@RELATION MyCoolRelation
@ATTRIBUTE Attr0 NUMERIC
@ATTRIBUTE subject STRING
@ATTRIBUTE Attr2 NUMERIC
@ATTRIBUTE Attr3 STRING
@ATTRIBUTE birthday DATE "yyyy-MM-dd HH:mm:ss"
@DATA
1.4, 'foo bar', 5, baz, "1900-08-08 12:12:12"
20.9, ruby, 46, roc,ks, "2005-10-23 12:12:12"
0, ruby, 46, rocks, "2001-02-19 12:12:12"
68.1, stuff, 728, 'is cool', "1974-02-10 12:12:12"
== INSTALL:
gem install wwood-rarff
== LICENSE:
Copyright (c) 2008-2012 Ben J. Woodcroft All rights reserved. See LICENSE.txt for details.
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
399Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
last30days-skill
18.7kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
