commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatesha Murthy TS (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula
Date Mon, 23 Jun 2014 10:00:38 GMT

    [ https://issues.apache.org/jira/browse/MATH-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040575#comment-14040575
] 

Venkatesha Murthy TS edited comment on MATH-1120 at 6/23/14 10:00 AM:
----------------------------------------------------------------------

Regarding medianOf3() method:
------------------------------------------
If we didnt throw exception then it means the user would presume that it may still be possible
to modify the selection logic with changing medianof3 logic. Instead i was thinking that 
if we deprecate and throw the MathIllegalArgumentException; then a clear message is given
saying that any invocation is really of no consequence and hence throwing exception out. Ofcourse
some one may still try override and put some logic in there but aleast our intent in deprecating
and the exception throwing would be coherrent in the existing code.
Please let know. 

Regarding Builder:
-----------------------
Any concerns do we see if the bUilder approach is modifed as 
Percentile.Builder().nanStrategy(REMOVED).pivotingStrategy(MEDIAN_OF_3).quantile(50),build();

B'cos i see that with the with<> approach suggested; we will keep creating additional
instances of percentle. So if instead we went with a build method only one Builder Helper
instance will be used untill we call build() method. I can send that patch if that thought
is acceptable. Please let know
ofcourse all builder attribute setters are fluent in nature and are optional. 

Regarding replace and remove
---------------------------------------
Also with Math-1130 changes coming in for remove and replace; i can add the refactored replace
and remove methods as well. Please let know if i can modify with these changes and send the
patch again.




was (Author: vmurthy):
Any concerns do we see if the bUilder approach is modifed as 
Percentile.Builder().nanStrategy(REMOVED).pivotingStrategy(MEDIAN_OF_3).quantile(50),build();

B'cos i see that with the with<> approach suggested; we will keep creating additional
instances of percentle. So if instead we went with a build method only one Builder Helper
instance will be used untill we call build() method. I can send that patch if that thought
is acceptable. Please let know
ofcourse all builder attribute setters are fluent in nature and are optional. 

Also with Math-1130 changes coming in for remove and replace; i can add the refactored replace
and remove methods as well. Please let know if i can modify with these changes and send the
patch again.



> Need Percentile computations that can be matched with standard spreadsheet formula
> ----------------------------------------------------------------------------------
>
>                 Key: MATH-1120
>                 URL: https://issues.apache.org/jira/browse/MATH-1120
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.2
>            Reporter: Venkatesha Murthy TS
>              Labels: Percentile
>             Fix For: 4.0
>
>         Attachments: 18-jun-percentile-with-estimation-patch, excel-percentile-patch,
percentile-with-estimation-patch, r-output.txt
>
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> The current Percentile implementation assumes and hard-codes the quantile pth position
as 
> p * (N+1)/100 and provides a kth selected value.
> However if we need to verify compare/contrast with standard statistical tools such as
say MS Excel; it would be good to provide an extensible way of morphing this selection of
position than hard code.
> For example in order to generate the percentile closely matching with MS Excel the position
required may be [p*(N-1)/100]+1.
> Please let me know if i could submit this as a patch.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message