i have a collection of Vectors as
var coefficentsList = new MutableList[Vector]
I want to sum each element of the individual vector to each column of other vectors such. eg The coefficentsList will have the following vectors:
v1 = [0.2, 0.4, 0.1]
v2 = [0.4, 0.5, 0.1]
v3 = [0, 0, 0.3]
So I'd want the resultant vector like
V = [0.6, 0.9, 0.5]
Now to do this, i came across the breeze vectors here and here so i wrote the following code :
coefficentsList.toArray.map{
Vector(_).reduce(_ + _)
}
but its giving me a type mismatch exception : found Array[Double], required : String
Is there any other way to do this as I'm stumped with this