Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def applyModelToAllCombinations(trainedModel: LogisticRegressionModel, allComparableDataset: Dataset[(Person, Person, Vector)]): Dataset[PredictedVector] ={
import spark.implicits._
val getFirst = udf((v: Vector) => v(1))
val predictionsRaw: DataFrame = trainedModel.transform(allComparableDataset)
.filter('label === 1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment