I would do a subtraction between two dense vectors, both of them are the result of a dataset and a function. there is an example
1. The first dense vector is a row of dataset(*, 2)
BroadcastedRows(DenseVector(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0))
2. The second dense vector is a return of predict_coef_sgd(dataset, coef)
DenseVector(0.2987569855650975, 0.14595105593031163, 0.08533326519733725,
0.21973731424800344, 0.24705900008926596, 0.9547021347460022,
0.8620341905282771, 0.9717729050420985, 0.9992954520878627,
0.9054893228110497)
I got an error when I subtract them
dataset(*, 2) - predict_coef_sgd(dataset, coef)
Name: Compile Error
Message: <console>:36: error: could not find implicit value for parameter op: breeze.linalg.operators.OpSub.Impl2[breeze.linalg.BroadcastedRows[breeze.linalg.DenseVector[Double],breeze.linalg.DenseVector[Double]],breeze.linalg.DenseVector[Double],That]
dataset(*, 2) - predict_coef_sgd(dataset, coef)
^
StackTrace:
Please comment how to convert "BroadcastedRows(DenseVector" to a dense vector. Thank you.