Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
zhengruifeng committed Dec 5, 2016
commit 61dcd51e601a4db69cbacf15334fd41a2a10998d
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ final class OneVsRestModel private[ml] (
predictions + ((index, prediction(1)))
}
model.setFeaturesCol($(featuresCol))
model.setPredictionCol($(predictionCol))
val transformedDataset = model.transform(df).select(columns: _*)
val updatedDataset = transformedDataset
.withColumn(tmpColName, updateUDF(col(accColName), col(rawPredictionCol)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ class OneVsRestSuite extends SparkFunSuite with MLlibTestSparkContext with Defau
ovaModel.setPredictionCol("pred")
val transformedDataset = ovaModel.transform(dataset2)
val outputFields = transformedDataset.schema.fieldNames.toSet
assert(outputFields.contains("y"))
assert(outputFields.contains("fea"))
assert(outputFields.contains("pred"))
assert(outputFields === Set("y", "fea", "pred"))
}

test("SPARK-8049: OneVsRest shouldn't output temp columns") {
Expand Down