I got question about preparation data for my ML algorithm. Raw data has format similar to:
{
"finances": [
{
"assets": 1230.39,
"investments": 3245.39,
"netProfit": 8765.45,
"year": 2017
},
{
"assets": 111.11,
"investments": 222.22,
"netProfit": 333.33,
"year": 2016
},
{
"assets": 1111.11,
"investments": 2222.22,
"netProfit": 3333.33,
"year": 2015
}
],
"someValue": 123.45,
"title": "Hello!"
}
And I am wondering what is best way to pass data about finances to my algorithm (Number of years can differ from 0 to 8).
I was thinking about making every parameter for every year new attribute, but this would lead to have many not null values for some cases, because not every record has 8 years of financial history.
My question is: What is best way to handle such data in Input data (In fact every of finances elements would have more values in it (around 10-15).