Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Working with YCML Dataframes

Yannis edited this page Dec 12, 2016 · 1 revision

Using the YCDataframe class, it is easy to prepare your data. To add examples to an instance of YCDataframe, call the -addSampleWithData: method, passing a NSDictionary with the data to be added. If the attributes indicated in the supplied dictionary are not in the dataframe yet, they are created automatically (including data). The example below shows how to create a new dataframe, and add a couple of records:

YCDataframe *frame = [YCDataframe dataframe];
[frame addSampleWithData:@{@"X1" : @1.0, @"X2" : @2.0, @"X3" : @-5.0}];
[frame addSampleWithData:@{@"X1" : @5.5, @"X2" : @-3.0, @"X3" : @-1.5}];

With two dataframes, one for input (independent variables) and one for output (dependent variables), you may easily train a predictive model, as described previously.

Clone this wiki locally