Github user MLnick commented on a diff in the pull request: https://github.com/apache/spark/pull/16158#discussion_r131340257 --- Diff: mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala --- @@ -133,7 +134,10 @@ class CrossValidator @Since("1.2.0") (@Since("1.4.0") override val uid: String) logInfo(s"Best cross-validation metric: $bestMetric.") val bestModel = est.fit(dataset, epm(bestIndex)).asInstanceOf[Model[_]] instr.logSuccess(bestModel) - copyValues(new CrossValidatorModel(uid, bestModel, metrics).setParent(this)) + val model = new CrossValidatorModel(uid, bestModel, metrics).setParent(this) + val summary = new TuningSummary(epm, metrics, bestIndex) + model.setSummary(Some(summary)) --- End diff -- Are there other obvious things that might go into the summary in future, that would make a `TuningSummary` class a better fit? Future support for say, multiple metrics, could simply extend the dataframe columns so that is ok. But is there anything else you can think of?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org