Bug 54403

Summary: [PATCH] Support of statistical function SLOPE
Product: POI Reporter: Johan Karlsteen <johan.karlsteen>
Component: POI OverallAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X 10.4   
Attachments: Implementation of SLOPE
Implementation of SLOPE

Description Johan Karlsteen 2013-01-10 15:34:32 UTC
Created attachment 29842 [details]
Implementation of SLOPE

Implementation of SLOPE

Patch containing implementation of SLOPE.

Basically SLOPE is just another result from the previously implemented INTERCEPT so I moved the Intercept-code to LinearRegressionFunction.java and created Slope.java.

This wasn't the prettiest way to solve but I don't feel that I'm that good at POI yet to do it in any other way.

Test cases created for Slope and everything works when running with a larger Excel file that uses both Slope and Intercept.
One test case got input data from:

Haven't been able to verify the documentation since I cannot get Apache Forrest running.
Comment 1 Nick Burch 2013-01-10 15:45:17 UTC
You need an old version of Apache Forrest, 0.5.1, to make the docs work. You can download it from http://archive.apache.org/dist/forrest/pre-0.6/ 

(Hopefully someone who knows a bit more about the functions can review and apply the patch shortly!)
Comment 2 Johan Karlsteen 2013-01-10 15:46:37 UTC
Created attachment 29843 [details]
Implementation of SLOPE

Including FunctionEval.java which was missing in last patch.
Comment 3 Yegor Kozlov 2013-01-19 18:34:45 UTC
Thanks for the patch, applied in r1435633