[ 
https://issues.apache.org/jira/browse/HADOOP-4437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645062#action_12645062
 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-4437:
------------------------------------------------

> This is nice. I understand it is just an example but if we run more maps for 
> a longer period of time can we get more Pi digits?

Yes, the more samples used the more digits will get in both Monte Carlo method 
(java.util.Random) and qMC method (Halton sequence).

However, the discrepancy for Halton sequence is smaller than java.util.Random.  
The expected error of java.util.Random is O(1/sqrt(N)) while the expected error 
of using Halton sequence is O((ln N)/N), where N is the number for samples.  
For estimating Pi with 100,000,000 samples, the accuracy of Halton is ~7 digits 
but java.util.Random is only ~4 digits as shown previously.

> Now, as an example it should imo have much better documentation.

This is a good point.  I plan to further improve the PiEstimator.  Let me also 
improve the documentation in the next issue.

> Use qMC sequence to improve the accuracy of PiEstimator
> -------------------------------------------------------
>
>                 Key: HADOOP-4437
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4437
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: examples
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: 4437_20081019.patch, 4437_20081103.patch
>
>
> Currently, PiEstimator uses java.util.Random to generate random 2d-points for 
> estimating pi. The numbers generated by java.util.Random are uniformly 
> distributed.  The 2d-points generated tense to have clump and gap. So the 
> accuracy of the estimated pi is low.  The accuracy can be improved by using a 
> quasi-Monte Carlo (qMC) sequence.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to