The vectorAssembler function in spark gives a vector[double] type as output, but i need to convert that to array[double].
I know that there is an inbuild Vector_to_array
function provided but i am not getting how to convert the column to array
some of the elements are sparse array as well.
var assembler = new VectorAssembler().setInputCols(Array("Pclass",
"Age",
"Fare",
"Gender",
"Boarded"
)).setOutputCol("features")
var transformedDF = assembler.setHandleInvalid("skip").transform(updatedDF)
this is the code and i need to convert the features column from vector to array type.