zhengruifeng opened a new pull request #24648: [SPARK-27777][ML] Eliminate 
uncessary sliding job in AreaUnderCurve
URL: https://github.com/apache/spark/pull/24648
 
 
   ## What changes were proposed in this pull request?
   compute AUC on one pass
   
   ## How was this patch tested?
   existing tests
   
   performance tests:
   ```
   import org.apache.spark.mllib.evaluation._
   val scoreAndLabels = sc.parallelize(Array.range(0, 100000).map{ i => 
(i.toDouble / 100000, (i % 2).toDouble) }, 4)
   scoreAndLabels.persist()
   scoreAndLabels.count()
   val tic = System.currentTimeMillis
   (0 until 100).foreach{i => val metrics = new 
BinaryClassificationMetrics(scoreAndLabels, 0); val auc = metrics.areaUnderROC; 
metrics.unpersist}
   val toc = System.currentTimeMillis
   toc - tic
   ```
   
   |New| Existing|
   |------|----------|
   |87532|103644|
   
   One-pass AUC saves about 16% computation time.
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to