Skip to content

Commit

Permalink
renamed initUDF in order to be consistent in OneVsRest
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Jun 26, 2015
1 parent 48ca15e commit 1ddb452
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ final class OneVsRestModel private[ml] (

// add an accumulator column to store predictions of all the models
val accColName = "mbc$acc" + UUID.randomUUID().toString
val init = udf { () => Map[Int, Double]() }
val initUDF = udf { () => Map[Int, Double]() }
val mapType = MapType(IntegerType, DoubleType, valueContainsNull = false)
val newDataset = dataset.withColumn(accColName, init())
val newDataset = dataset.withColumn(accColName, initUDF())

// persist if underlying dataset is not persistent.
val handlePersistence = dataset.rdd.getStorageLevel == StorageLevel.NONE
Expand Down

0 comments on commit 1ddb452

Please sign in to comment.