File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java code for calculating 95 percentile

 
Ashu Bharadwaj
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Which is the best solution for calculating 95th Percentile: calculating in Java code or in SQL. Need efficient way. The input file is large.
 
Paul Clapham
Sheriff
Pie
Posts: 20187
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general I would say you should do the calculation in the database if it's possible.
 
Ashu Bharadwaj
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul for your reply.
 
Ashu Bharadwaj
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please provide algorithm for calculating 95th percentile
 
Campbell Ritchie
Sheriff
Pie
Posts: 47274
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashu Bharadwaj wrote:Can you please provide algorithm for calculating 95th percentile
No. We do not know how your data are organised, so how should we know how to calculate the 95th centile? Can’t you order the data, count them, and then iterate the data to 95% of the count?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic