For potential regression curve algorithm, we try to get y = C * D^x Switching to neperian logs: ln(y) = ln(C) + x ln(D) So we make a linear regression and get slope = ln(D) => D = exp(slope) intercept = ln(C) => C = exp(intercept) The current code computes the linear regression between log(y) and log(x) It should be between ln(y) and x. Moreover, the slope is ln(D) so exp(slope) should be returned. Finally, in getCurveValue, the return value is y = C x^D which is wrong Code in chart2/source/tools/PotentialRegressionCurveCalculator.cxx is wrong since 2003... so the fix can be cherry-picked to most versions.
Created attachment 116710 [details] Test file
Philippe Jung committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e0e285574244e855fd148ab7320b1aeb5914655a tdf#92231 Potential regression curve calculation is wrong It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 116717 [details] Example with "Power" and "Exponential" regression I think, this change is wrong. The "Potential regression curve" is of kind y=A * x^B and is used for the UI term "Power". Do not confuse it with "Exponential" regression curve.
Yep already reverted Sorry for this. Closing as invalid report
Philippe Jung committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d16e154c627ecc0cb21aaf4b28f7f5ae48ebbde1 Revert "tdf#92231 Potential regression curve calculation is wrong" It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.