just a nit style pick here since @mengxr asked me to chime in.

it would be better if you just put weights and the rest on the same line, e.g.

```scala
var regVal = updater.compute(
  weights, new DoubleMatrix(initialWeights.length, 1), 0, 1, regParam)._2
```