[ https://issues.apache.org/jira/browse/MATH-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13999720#comment-13999720 ]
Gilles commented on MATH-418: ----------------------------- Thanks for you effort up to now. There are however some remarks about the coding style, to try and ensure consistency throughout the Commons Math codebase: * You should not use an underscore as a suffix or prefix (for method or variable names) * For constants, use the "final" keyword in the declaration * Do not overuse <p> in comments (especially in protected and private classes) * No initial uppercase letter after @return * Do not use protected fields (i.e. create setters instead) * Conform to the natural rules for capitalization in comments (e.g. no uppercase for the second word in a sentence) * Remove code that was commented-out (and indicated as unnecessary) * Do not start a @param or @throws with the word "is" (or "passed in") * Do not use a single uppercase letter as a variable name * Prefer (moderately) long names for instance fields and methods wherever it would make the code more self-documenting (cf. "ns", "nps", "qs") * Avoid consecutive uppercase letters (e.g. "processADataPoint" should rather be " "processDataPoint"). * (Personal preference) The first line of a Javadoc comment should not be broken after "@param x"; it is harder to read and needlessly increases the height of the text. * Indicates the purpose of "package" visibility when it is used instead of "private" or "protected". * Fully comment public fields, parameters, constructor and methods: see e.g. the constructor of "Marker" where the reader is referred to the documentation of a _private_ field (which would not appear in the generated HTML) I can't comment much about the algorithmic side. A few points I noticed: # The input (quantile) is allowed to be either in \[0, 1\] or in (1, 100]; this is error-prone and this kind of flexibility is not to be handled at the math level (IMHO). The input should be a primitive "double", not a "Number". # At line 1206, the error message is abused, as it should refer to an index. # At line 1211, use "NullArgumentException" in place of "MathIllegalArgumentException". # At line 1214, do not combine different types of failures, and use "DimensionMismatchException" in place of "MathIllegalArgumentException". > 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: 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)