[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-08-31 Thread Luc Maisonobe (JIRA)

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

Luc Maisonobe commented on MATH-1120:
-

Yes, it will be included in next version as the code is already in the main 
branch.

> 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: 3.4
>
> Attachments: 18-jun-percentile-with-estimation-patch, 
> 27-jun-refactored-kth-pivoting.patch, excel-percentile-patch, 
> math-1120-removeAndSlice.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.3.4#6332)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-08-31 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Can this change be made available in next available version (instead of 4.0)

> 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, 
> 27-jun-refactored-kth-pivoting.patch, excel-percentile-patch, 
> math-1120-removeAndSlice.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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-07-21 Thread Luc Maisonobe (JIRA)

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

Luc Maisonobe commented on MATH-1120:
-

Patch from today (2014-07-21) applied, with only whitespace changes (removed 
tabs).

Thanks for the patch.

> 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, 
> 27-jun-refactored-kth-pivoting.patch, excel-percentile-patch, 
> math-1120-removeAndSlice.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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-07-13 Thread Luc Maisonobe (JIRA)

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

Luc Maisonobe commented on MATH-1120:
-

The patch from June 27th has been applied, with a few changes, as the patch did 
not include the factored out classes. The classes were therefore extracted from 
the previous version and API adapted for the select method (which now provides 
the arrays to work on).

Thanks for the patch

As explained on the mailing list, the problem for FIXED NaNStrategy is still 
there, and I still want to look at it.

> 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, 
> 27-jun-refactored-kth-pivoting.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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-07-04 Thread Phil Steitz (JIRA)

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

Phil Steitz commented on MATH-1120:
---

Updates appear on the this ticket.   As the reporter, you will be notified 
automatically by JIRA of any updates.

> 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, 
> 27-jun-refactored-kth-pivoting.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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-07-03 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Please let me know of any updates on this.

> 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, 
> 27-jun-refactored-kth-pivoting.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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-07-01 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Luc, All

Any updates on this

Thanks
Venkat

> 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, 
> 27-jun-refactored-kth-pivoting.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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-23 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Got the view point on Builder.

However on the medianOf3: just want to make my point clear. If we add any code 
except a one liner for throwing exception; the user is going to be mislead 
assuming it is being used where as it is not. 

On the remove and replace refactoring, please give me some time as MATH-1130 is 
in progress.

> 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-23 Thread Luc Maisonobe (JIRA)

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

Luc Maisonobe commented on MATH-1120:
-

Yes, but the intermediate instances only copy references, so its only a few 
bytes.
We use the same pattern elsewhere (currently only in a small part of 
optimization) and intend to use it further (for example in ODE). Having the 
instance themselves implement the withXxx allow the following use case:

{code}
 Algo a = new Algo().withX().withY();
 double result1 = a.doSomeHugeComputation();
 Algo b = a.withZ();
 double result2 = b.doSomeHugeComputation();
 double delta = result2 - result1; // here, we have the differential effect of 
the withZ() setting
{code}

> 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-23 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


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. 
So for eg:

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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-22 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

bq. "checkNotANumber" [...] in "MathArrays" (and renamed "checkNotNaN").

r1604651


> 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-22 Thread Luc Maisonobe (JIRA)

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

Luc Maisonobe commented on MATH-1120:
-

Sure, these methods doulf be moved and API adjusted to be more general.

Another thing that should be modified is the random generator for the RANDOM 
piviting strategy: user should have a way to set the seed, but with an enum it 
will be tricky.

> 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-22 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

Besides the change I performed in r1604641, I think that "checkNotANumber" 
should be in "MathArrays" (and renamed "checkNotNaN").
It could be made similar to the other "check..." methods:
{code}
public static void checkNotNaN(double[] array) {
  // ...
}
{code}
provided the code in "Percentile" make the copy before checking.
It is slightly less efficient if an exception is to be thrown, but if that's 
the case, efficiency will be low anyways because an exception is raised.

I think that "removeAndSplice" and "replaceAndSplice" should also go to 
"MathArrays", but, similarly to "copyOfRange" (in JDK's "Arrays"), the more 
natural arguments are the indices "from" and "to" that define the interval 
(rather then the "start" index and a length).


> 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-22 Thread Luc Maisonobe (JIRA)

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

Luc Maisonobe commented on MATH-1120:
-

Patch applied (with several changes) as of r1604614.

Please look at what have been applied and discuss about it on the mailing list 
so we can converge to a final resolution.

Thanks a lot for the patch!

> 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-16 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

bq. [...] eliminated AtomicInteger [...]

Good. ;)

But I noticed new little problems.

Why not have two separate methods: "recodeNaN" and "removeNaN"?
The current "recodeNaNs" mixes both, which I think is not necessary.

Method "getWorkArray" uses exceptions to control flow. Why not directly proceed 
with handling (i.e. without raising an exception first)?
Like in the following (untested) code (using the new methods proposed above).
{code}
switch (nanStrategy) {
  case MAXIMAL:
   return recodeNaN(temp, Double.POSITIVE_INFINITY);
  case MAXIMAL:
   return recodeNaN(temp, Double.NEGATIVE_INFINITY);
  case FAILED:
   checkNotNaN(temp); // Should throw when it encounters a NaN
   return temp;
  case REMOVED:
  return removeNaN(temp);
  default:
  return temp;
}
{code}

At first sight, I do not think that it is a good idea to have several _default_ 
filtering strategies (i.e. an implicit startegy that varies with the {{Type}}).
I'm not even sure that filtering should happen at this point (i.e. in 
{{Percentile}}). IMHO, if an algorithm cannot handle some values, they should 
have been filtered out first.
It could be construed that an in-place filtering could be more space-efficient, 
but that's not the case here since "recodeNaNs" allocates a new array.
These design decisions should be brought to the "dev" ML.


> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-16 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


In specific to Comments on AtomicInteger:
Now, i have removed the method preProcess and thus eliminated AtomicInteger as 
well. Instead please refer to NanStrategy usage. Usere may wish to set a 
Nanstrategy during construction of Percentile to handle Nans in specific ways 
as defined in NaNStrategy.

Patch is attached with this new change.

> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-15 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

bq. I have added AtomicInteger (not b'cos of Threads)but as a mutable holder 
for Int (akin to INOUT parameter). [...]

But what is the purpose of this argument?

I also don't get the purpose of the "preProcess" method.

> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-15 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


i hope patch attached is patchable without errors as i did verify in my windows 
cygwin environment
please let know on this and for any other comments


> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-11 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

I noticed that you use an "AtomicInteger". This triggers an association with 
"thread-safety", but no comment really states the purpose of this argument.


> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-11 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

The patch cannot be applied cleanly. Here is the message:
{noformat}
checking file 
src/test/java/org/apache/commons/math3/stat/descriptive/rank/PercentileTest.java
checking file 
src/test/java/org/apache/commons/math3/stat/descriptive/rank/MedianTest.java
checking file 
src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
Hunk #2 FAILED at 88.
1 out of 9 hunks FAILED
checking file 
src/main/java/org/apache/commons/math3/stat/descriptive/rank/Median.java
{noformat}


> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-10 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Please let me know your opinion on the patch.

> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-07 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

* I would not have the "alternateName", nor refer to "ScyPy" for every enum 
value. One name is sufficient to guide people to the docs (Javadoc and/or 
Wikipedia).
* A comment like "Each enum has a MathJax comment about the formulaes" would be 
cryptic for a reader of the HTML generated doc (where one just sees the 
rendered formula).
* There are some typos (but this could corrected later).
* I would not include other programming languages (i.e. "R") excerpts in the 
Javadoc.
* I would not mix HTML with MathJax for a single formula (cf. "index" and 
"estimate").
* Do not use a single uppercase for a variable name (cf. "N").
* Some "final" keywords could be added.
* "href" attribute values must be between double-quotes. And one is broken over 
two lines (cf. Javadoc of "EstimationTechnique")
* Is "EstimationTechnique" the best possible name?  As it will be part of the 
public API, perhaps you could ask this question on the "dev" ML.
* MAX_CACHED_LEVELS is used twice in the same computation:  {code}(0x1 << 
MAX_CACHED_LEVELS) - 1{code}
  Why not directly define the constant as the result? It would also make the 
code easier to read.
* The "mediaOf3" deprecation message should probably contain a link to the 
replacement.

Otherwise, the list of alternate percentile definitions seems a nice addition 
to the CM stat functionality. Thanks.

> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-06 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Would like to know for any comments/observations on this 
patch.(percentile-with-estimation-patch).

> 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: 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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-02 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:



Hi 


I have updated the patch corrected. hope you should be able to apply patch
Please let know 


By the way how do i verify patching. is it path -p0 < file  ??
 

thanks
venkat



On Monday, 2 June 2014 9:09 AM, Phil Steitz (JIRA)  wrote:
 



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

Phil Steitz commented on MATH-1120:
---

The approach sounds reasonable to me, but the patch fails when I try to apply 
it to the code in trunk.  It also appears to mix formatting changes with code 
modifications.  Please turn off whatever your IDE is doing to reformat the code 
so we can focus on just what is being changed in the patch.




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


> 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: excel-percentile-patch, percentile-with-estimation-patch
>
>   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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-06-01 Thread Phil Steitz (JIRA)

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

Phil Steitz commented on MATH-1120:
---

The approach sounds reasonable to me, but the patch fails when I try to apply 
it to the code in trunk.  It also appears to mix formatting changes with code 
modifications.  Please turn off whatever your IDE is doing to reformat the code 
so we can focus on just what is being changed in the patch.

> 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: excel-percentile-patch, percentile-with-estimation-patch
>
>   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)


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-05-21 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Thanks for the understanding.

Please suggest the next steps as i have not done any commit so far. 
does any one else have any other issues / approaches on this.(i have also sent 
an email on this to dev@)




> 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: excel-percentile-patch
>
>   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.
> I do have patch ready with small change needed in Percentile class and a new 
> ExcelPercentile class written with tests closely matching with that of 
> PercentileTest class.
> Please let me know if i could submit this as a patch.



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


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-05-21 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

bq. As per your comment i removed the ExcelPercentile as a main class and moved 
it under test but however the main intent was in the changes related to 
Percentile (basically the computeQuantilePosition method)

I get it now!  Being able to override the definition (as per your patch, 
indeed) should be quite acceptable.


> 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: excel-percentile-patch
>
>   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.
> I do have patch ready with small change needed in Percentile class and a new 
> ExcelPercentile class written with tests closely matching with that of 
> PercentileTest class.
> Please let me know if i could submit this as a patch.



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


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-05-21 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Thanks for suggestion. I will open up another mail thread on this.
However from the patch attached perspective; just wanted to clarify; As per 
your comment i removed the ExcelPercentile as a main class and moved it under 
test but however the main intent was in the changes related to Percentile 
(basically the computeQuantilePosition method). 
As suggested will open a new mail thread. thanks 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: excel-percentile-patch
>
>   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.
> I do have patch ready with small change needed in Percentile class and a new 
> ExcelPercentile class written with tests closely matching with that of 
> PercentileTest class.
> Please let me know if i could submit this as a patch.



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


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-05-21 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

The patch does not contain the "ExcelPercentile" class.

But anyways, you should probably start a discussion on the "dev" ML, to get 
people's opinions on how they would handle the possible variations of the 
position's definition. E.g. if there are few possible cases, a "enum" might 
also be considered.

> 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: excel-percentile-patch
>
>   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.
> I do have patch ready with small change needed in Percentile class and a new 
> ExcelPercentile class written with tests closely matching with that of 
> PercentileTest class.
> Please let me know if i could submit this as a patch.



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


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-05-16 Thread Gilles (JIRA)

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

Gilles commented on MATH-1120:
--

bq [...] new {{ExcelPercentile}} class [...]

That looks out of place in a free project. ;)

Couldn't the "conversion" from one definition to another be handled before 
passing the value to the CM class?


> 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
>
>   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.
> I do have patch ready with small change needed in Percentile class and a new 
> ExcelPercentile class written with tests closely matching with that of 
> PercentileTest class.
> Please let me know if i could submit this as a patch.



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


[jira] [Commented] (MATH-1120) Need Percentile computations that can be matched with standard spreadsheet formula

2014-05-11 Thread Venkatesha Murthy TS (JIRA)

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

Venkatesha Murthy TS commented on MATH-1120:


Hi

Any opinions on this.. 

Please let know

thanks
murthy

> 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
>
>   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.
> I do have patch ready with small change needed in Percentile class and a new 
> ExcelPercentile class written with tests closely matching with that of 
> PercentileTest class.
> Please let me know if i could submit this as a patch.



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