Feature Extraction

Overview


The first step to building a model (see machine learning process) is to extract the necessary features of the data that the model will train on. This process is typically known as feature extraction.

Starting from an array of data, the feature extraction process will use Array Transformations to tranform the dataset to one that can be used by tensor-flow.

Transforming Data


Tensor flow takes records in the form of arrays. For example, a single record might look the following

let record = [1,0.05, 3.2];
					
This record has three features. Typically, dataset will be constructed to be objects with properties. An example record might look like the following

let record = {diff:1, return:0.3, ratio:3.2}
					

let records = [{diff:1, return:0.03, ratio:3.2},
				{diff:0.6, return:0.01, ratio:2.2},
				{diff:1.1, return:0, ratio:1},
				{diff:-0.2, return:-0.3, ratio:3}];

let transformed = records.map(p=>[p.diff, p.return, p.ratio])
					

Contents