Github user hhbyyh commented on a diff in the pull request:
https://github.com/apache/spark/pull/16158#discussion_r131270741
--- 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 --
If we want to just save the tuning summary in the model, Perhaps we can
just discard the TuningSummary, and add a tuningSummary field in the models.
Sounds good?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]