Project

data_prep

0.0
No commit activity in last 3 years
No release in over 3 years
A tool to help prepare your data.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

Data Prep¶ ↑

Data Prep is a gem that makes extracting: training, testing and validation data nice and simple.

All you have to do is give it your data and Data Prep will try to spread your classes as evenly as possible in a 50:25:25 (training, testing, validation) split.

Install¶ ↑

sudo gem sources -a http://gemcutter.org
sudo gem install date_prep

Example¶ ↑

ham = [[1, 0.5]] * 20
spam = [[0, 0.2]] * 20
data_prep = DataPrep.new(1 => ham, 0 => spam)

data_prep.testing.size
   #=> 10
data_prep.validation.size
   #=> 10
data_prep.training.size
   #=> 20

# To make training easy, Data Prep places the data's class
# along side the piece of data

data_prep.training[0].inspect
   #=> [[1, 0.5], [1]] == [[data], [output]]

Copyright © 2009 Red Davis. See LICENSE for details.