What do columns ‘rawPrediction’ and ‘probability’ of DataFrame mean in Spark MLlib?

前端 未结 3 591
余生分开走
余生分开走 2021-02-05 10:09

After I trained a LogisticRegressionModel, I transformed the test data DF with it and get the prediction DF. And then when I call prediction.show(), the output column names are:

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 11:04

    If classification model is logistic regression,

    rawPrediction is equal (w*x + bias) variable coefficients values

    probability is 1/(1+e^(w*x + bias))

    prediction is 0 or 1.

提交回复
热议问题