> On June 11, 2014, 7:31 a.m., Mehant Baid wrote: > > exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java, > > line 27 > > <https://reviews.apache.org/r/21941/diff/1/?file=595305#file595305line27> > > > > Correct the comment to indicate the right function names
Fixed! > On June 11, 2014, 7:31 a.m., Mehant Baid wrote: > > exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java, > > line 52 > > <https://reviews.apache.org/r/21941/diff/1/?file=595305#file595305line52> > > > > You can probably get rid of the 'if' here. Since you always have the > > aliasname. Fixed! > On June 11, 2014, 7:31 a.m., Mehant Baid wrote: > > exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java, > > line 107 > > <https://reviews.apache.org/r/21941/diff/1/?file=595305#file595305line107> > > > > which method/ formula are you using to compute the correlation > > coefficient? Do you think if it might suffer from catastrophic cancellation > > problem? > > Ted Dunning wrote: > This appears to use Welford's method and should be numerically quite > stable. > > It will be difficult to do better in a single pass. It uses Welford's online incremental algo and is much less prone to loss of precision due to catastrophic cancellation - wiki. - Yash ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21941/#review45346 ----------------------------------------------------------- On June 14, 2014, 7:21 p.m., Yash Sharma wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21941/ > ----------------------------------------------------------- > > (Updated June 14, 2014, 7:21 p.m.) > > > Review request for drill, Aditya Kishore, Mehant Baid, and Timothy Chen. > > > Repository: drill-git > > > Description > ------- > > Added implementation for Correlation coefficient calculation function. > > > Diffs > ----- > > exec/java-exec/src/main/codegen/config.fmpp 5c0d03b > exec/java-exec/src/main/codegen/data/CorrelationTypes.tdd PRE-CREATION > exec/java-exec/src/main/codegen/data/CovarTypes.tdd PRE-CREATION > exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java > PRE-CREATION > exec/java-exec/src/main/codegen/templates/CovarTypeFunctions.java > PRE-CREATION > > exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunction.java > ffb372d > exec/java-exec/src/test/resources/functions/test_covariance.json > PRE-CREATION > > Diff: https://reviews.apache.org/r/21941/diff/ > > > Testing > ------- > > Yes. > $mvn test -Dtest=TestAggregateFunction#testCovarianceCorrelation > > > Thanks, > > Yash Sharma > >
