Created
January 17, 2017 21:34
-
-
Save zeryx/312140857c97c607d3ce96d74ccc5e61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val formattedPredictions: List[Option[String]] = predictions.map(_.classPredictions.headOption.map(_.prediction)) | |
val formattedLabels: List[Option[String]] = data.map(_.label) | |
val (guesses, truths): (List[String], List[String]) = ( | |
for { | |
(guess, truth) <- formattedPredictions zip formattedLabels | |
realGuess <- guess | |
realTruth <- truth | |
}yield(realGuess, realTruth) | |
).unzip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment