I'm trying to create a DataSet from 4 arrays. I have arrays like this :
// Array 1
val rawValues = rawData.select(collect_list("rawValue")).first().getList[Double](0).asScala.toArray
// Array 2
var trendValues = Array[Double]()
// Array 3
var seasonalValues = Array[Double]()
// Array 4
var remainder = Array[Double]()
I have populated last 3 arrays based upon some computations (not included here) on the first Array. All the 4 arrays are of equal size and to populate the first array, another dataset's column-rawValue is converted into an Array as shown above.
After doing all the computations, I want to create a DataSet which is having 4 separate columns and every column is representing above 4 separate arrays.
So, basically how can I create a Dataset from arrays? I'm struggling in doing the same.
Please help.