Github user jkbradley commented on a diff in the pull request: https://github.com/apache/spark/pull/19208#discussion_r149225109 --- Diff: mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala --- @@ -262,15 +273,26 @@ class CrossValidatorModel private[ml] ( private var _subModels: Option[Array[Array[Model[_]]]] = None - @Since("2.3.0") private[tuning] def setSubModels(subModels: Option[Array[Array[Model[_]]]]) : CrossValidatorModel = { _subModels = subModels this } + /** + * @return submodels represented in two dimension array. The index of outer array is the + * fold index, and the index of inner array corresponds to the ordering of + * estimatorParamsMaps + * + * Note: If submodels not available, exception will be thrown. only when we set collectSubModels --- End diff -- reword, and use ```@throws``` scaladoc: ``` @throws IllegalArgumentException if subModels are not available. To retrieve subModels, make sure to set collectSubModels to true before fitting. ``` (Please fix wording in the error message too.)
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org