Pyspark ML: how to get subModels values with CrossValidator()
问题 I would like to get the cross-validation 's (internal) training accuracy, using PySpark end ML library: lr = LogisticRegression() param_grid = (ParamGridBuilder() .addGrid(lr.regParam, [0.01, 0.5]) .addGrid(lr.maxIter, [5, 10]) .addGrid(lr.elasticNetParam, [0.01, 0.1]) .build()) evaluator = MulticlassClassificationEvaluator(predictionCol='prediction') cv = CrossValidator(estimator=lr, estimatorParamMaps=param_grid, evaluator=evaluator, numFolds=5) model_cv = cv.fit(train) predictions_lr =