Does the following fit?

~~~
val costFun = 
  new CostFun(data, gradient, updater, regParam, miniBatchFraction, lossHistory, miniBatchSize)
~~~