First, implement a function that computes the summand (w x - y)x,, and test this
function on two examples. Use (Vectors
(https://spark.apache.org/docs/latest/api/scala/org/apache/spark/millib/linalg/Vectors$.
to create dense vectors w and use (Labeled Point
(https://spark.apache.org/docs/latest/api/scala/org/apache/spark/mllib/regression/Labe
to create training dataset with 3 features. You can also use (Breeze
(https://github.com/scalanlp/breeze)) to do the dot product.
Fig: 1