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

ltskdhd1  于 5个月前  发布在  Scala
关注(0)|答案(1)|浏览(53)

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

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()",我想我需要给予我的预测结果,列“预测”

nszi6y05

nszi6y051#

也许这个答案可以帮助你。https://stackoverflow.com/questions/37903288/what-do-columns-rawprediction-and-probability-of-martrame-mean-in-spark-mll#:~:text= rawPrediction%20is%20the%20raw%20output,equal%20to%20that%20of%20rawPrediction%20
对我来说,我使用微软的lightgbm,“rawPrediction”和“probability”的AUC在二进制数据集上的差异小于1 e-15。

相关问题