我正在数据集上构建交叉验证模型。交叉验证对象具有 avgMetrics 属性,这些属性将返回数组。
evaluator = MulticlassClassificationEvaluator(labelCol='label',predictionCol='prediction',metricName='f1')
crossval = CrossValidator(estimator=self.pipeline,
estimatorParamMaps=paramGrid,
evaluator=evaluator,
numFolds=2)
print(cvModel.avgMetrics)
[0.42175585108783414,
0.4585199817620358,
0.39932871646955814,
0.4310619715036083,
0.46251606720905303,
0.42030120869345633,
0.41120037704551726,
0.4650393846493733,
0.3478141848099525]
cvMode.avgMetrics 返回一组指标。我如何知道它返回什么指标?无论如何,有没有要获取指标名称?