zhengruifeng commented on pull request #28710:
URL: https://github.com/apache/spark/pull/28710#issuecomment-643131145


   @huaxingao 
   since `scoreCol` is only used to compute `BinaryClassificationMetrics`, so 
what about putting it in `BinaryClassificationSummary`:
   ```
   trait BinaryClassificationSummary extends ClassificationSummary {
    def scoreCol: String = null
   }
   ```
   
   Then in `LogisticRegression`:
   ```
   LogisticRegressionSummary extends ClassificationSummary {
      def probabilityCol = "..."
   }
   
   trait BinaryLogisticRegressionSummary extends LogisticRegressionSummary with 
BinaryClassificationSummary {
       def scoreCol = if (probabilityCol.nonEmpty) probabilityCol else if 
(rawPredictionCol.nonEmpty) rawPredictionCol else throw ...
   }
   
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to