You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/20 09:39:27 UTC

[GitHub] [spark] zhengruifeng opened a new pull request #24648: [SPARK-27777][ML] Eliminate uncessary sliding job in AreaUnderCurve

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org