Spark ML,二元分类的“rawPredictionCol”参数

问题描述 投票:0回答:1

我想在 Pipeline 之后使用 Spark.ml 中的二进制分类器来评估我的模型。我使用这个代码:

val gbt = new GBTClassifier()
  .setLabelCol("Label_Index")
  .setFeaturesCol("features")
  .setMaxIter(10)
  .setMaxDepth(7)
  .setSubsamplingRate(0.1)
  .setMinInstancesPerNode(15)


// Convert indexed labels back to original labels.
  val labelConverter = new IndexToString()
  .setInputCol("prediction")
  .setOutputCol("predictedLabel")
  .setLabels(indexer_2.labels)

val evaluator_auc = new BinaryClassificationEvaluator()
.setLabelCol("Label_Index")
.setRawPredictionCol("")
.setMetricName("areaUnderROC")

我真的不知道我需要给“setRawPredictionCol()”哪些参数,我想我需要给出我的预测结果,即“预测”列

scala apache-spark apache-spark-ml
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.