Hello, 

I'm currently working on Python numpy package to develop linear interpolation 
methods for quantiles. 
Currently, numpy only support the type 7 of Hyndman & Fan and I did the 
implementation for the 8 other methods to do as much as R ::quantile. 

As you may guess, I was inspired by R implementation as well as other sources, 
which lead to my questions: 

About fuzz (see first reference below for the source code), 
fuzz <- 4 * .Machine $ double.eps 
I think I understand why the machine epsilon is used to correct some edge cases 
where the float comparisons would fail. 
However I don't get why epsilon is multiplied by 4 instead of simply using 
epsilon. 
Is there someone who can explain this 4 ? 

About licence, 
Numpy is under license BSD and R is on GPL. 
The only thing I really cherry picked and rewrote for numpy is the fuzz part. 
I'm quite new to open source development. We are wondering if doing this breaks 
the license GPL and if I can credit the original authors. 
Plus, I'm not quite sure this is the right place to ask this, if not, sorry for 
the noise. 
The relevant discussion on numpy PR is here: [ 
https://github.com/numpy/numpy/pull/19857#discussion_r706019184 | 
https://github.com/numpy/numpy/pull/19857#discussion_r706019184 ] 


Thank you for your time. 

Regards, 
Abel Aoun 


References: 
The source code for R::quantile (fuzz is at line 82) [ 
https://github.com/wch/r-source/blob/79298c499218846d14500255efd622b5021c10ec/src/library/stats/R/quantile.R
 | 
https://github.com/wch/r-source/blob/79298c499218846d14500255efd622b5021c10ec/src/library/stats/R/quantile.R
 ] [ https://github.com/numpy/numpy/pull/19857 ] 
R doc for quantile : [ 
https://www.rdocumentation.org/packages/stats/versions/3.5.0/topics/quantile | 
https://www.rdocumentation.org/packages/stats/versions/3.5.0/topics/quantile ] 
The ongoing PR on numpy: [ https://github.com/numpy/numpy/pull/19857 | 
https://github.com/numpy/numpy/pull/19857 ] 



        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to