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

Venkatesha Murthy TS commented on MATH-418:
-------------------------------------------

Sorry i meant to ask the question as follows:

The context is : I have modeled the algorithm into 2 nested static classes(i.e 
Markers and Marker) as i couldnt possibly move all of them to one big main 
class (The main class is PSquarePercentile).  Since the bulk of logic needs to 
be tested and coveraged; i am forced to expose the logic as a protected inner 
interface(Which is PSquareMarkers where Markers implements PSquareMarkers). 
This interface is instantiated using a creation method (newMarkers)  that 
returns an instance of Markers. Even the PSquarePercentile makes use of 
newMarkers for instantiating Markers,while PSquarePercentile class per-se 
doesnt allow external setting of Markers.

So my thought here has been to model marker and markers as separate and clear 
entities/classes (infact private static as they are really independent from 
main class) ; yet however allow sufficient hooks for testing (for instance to 
cover for more than 90%) by means of exposing them as one minimal interface(i.e 
PSquareMarkers). Even yet; do not allow external setting of markers into 
PSquarePercentile to keep up the compatability and safety. I am assuming this 
to be the black box. So for no extensibility at the moment except for clients 
to look at an interface. Infact an earlier interface PSquareEstimator has been 
subsumed inside Marker class. so essentially its all in these 2 nested classes.

I am most willing to understand solutions to my problem here. please help if 
there are other simplifications that i can add here ; but just thought of 
sharing what has been going on in my mind when i am doing this. Some where 
though i tend to think if i merge all the nested classes to main, its going to 
be one big class (akin to GOD class anti pattern) which is where i am at cross 
roads unable to decide. 

Yes i have run mvn site target and taken care of pmd, checkstyle, findbug and 
jacoco code coverage

I have also 
a) removed toMap() method, 
b) all the private javadoc @link  parameters 
c) removed all caps comments,
d) removed  second word upper case starting etc in javadoc.
e) turned almost all noninterface methods to private
f) turned all nested classes to private static

Gilles,Phill: Please let me know if i could contact you over messenger such as 
yahoo! etc..



> add a storeless version of Percentile
> -------------------------------------
>
>                 Key: MATH-418
>                 URL: https://issues.apache.org/jira/browse/MATH-418
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.1
>            Reporter: Luc Maisonobe
>             Fix For: 4.0
>
>         Attachments: 30-may-2014-418-psquare-patch, 418-psquare-patch, 
> psquare-patch
>
>
> The Percentile class can handle only in-memory data.
> It would be interesting to use an on-line algorithm to estimate quantiles as 
> a storeless statistic.
> An example of such an algorithm is the exponentially weighted stochastic 
> approximation  described in a 2000 paper by Fei Chen ,  Diane Lambert  and 
> José C. Pinheiro "Incremental Quantile Estimation for Massive Tracking" which 
> can be retrieved from CiteSeerX at 
> [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.105.1580].



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

Reply via email to