(this is a copy of this Ooo bug: http://openoffice.org/bugzilla/show_bug.cgi?id=20819 See also: http://wiki.services.openoffice.org/wiki/Chart2/TrendLines#Add_polynomial_regression_type) There are already offered different types of regression lines (linear regression, exponential regression etc.), but a polynomial regression curve is still missing. There is an extension: http://oooconv.free.fr/fitoo/fitoo_en.html
Hello, To get polynomial regression, you better use CorelPoly macro from Laurent Godard (same page as FitOOo) which is simpler than FitOOo. A correction of this macro is proposed on issue 20819 http://openoffice.org/bugzilla/show_bug.cgi?id=20819 Actually, you may use CorelPolyGUI extension, which a graphic user interface quite convivial to build polynomial regression curve. http://extensions.services.openoffice.org/en/project/CorelPolyGUI SLAMLib extension propose also some functions (POLYFIT, POLYVAL) to get a polynomial regression. http://extensions.services.openoffice.org/en/project/SLAMLib To solve this issue, file format must be modified to store information about regression: other regressions (linear, exponential,...) use only two terms in their equation. Polynomial equation require a variable number of terms. So do we have to wait that ODF specification is modified, or can LibO extend ODF specification to store this information? A file format modification has been proposed to OASIS to include these parameter in December 2008, but it had no effect. It is one of the most wanted feature in Chart. What could help to get this implemented?
Created attachment 50500 [details] ODF file format modification proposed to OASIS in December 2008 This file contains file format modification requested to get polynomial regression curve.
Created attachment 50501 [details] Proposition of dialog box for user interface This file summarize different enhancement requested for trend line, and propose a user interface.
Hello, New version of CorelPoly (v 1.0!) available on http://extensions-test.libreoffice.org/extension-center/improved-trend-lines/ Now all classic regression are included.
[This is an automated message.] This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it started right out as NEW without ever being explicitly confirmed. The bug is changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases. Details on how to test the 3.5.0 beta1 can be found at: http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1 more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Hello, This enhancement has not been introduced in LibO 3.5. Extension CorelPolyGUI (Improved trend lines) try to answer this question but is not integrated in LibO: http://extensions.libreoffice.org/extension-center/improved-trend-lines
Polynomial regression is a very important feature I am needing for data analysis in my high school physics lessons. An easy to use implementation is needed, so the students can focus on the physics.
Could you please retest using LO 3.6.6 or 4.0.3 regarding some updates on extension stated in comment 6 ?
Hi
Ups.. OK let me try again: Hi, I have pushed polynomial regression curve code to the master and is now available in the latest daily build [1]. Implemented features are: * polynomial regression curve with degree parameter. * moving average regression curve with period parameter. * bound regression curve to min and max X values and add forward / backward extrapolation parameter * force intercept for polynomial and linear regression curve * support added to ooxml, old MS binary formats, odt * allow more than one trend line per series The functionality still needs polish (especially in the GUI) and some clean-up but in general it should work OK. Please test it and provide your opinion. Thanks! Regards, Tomaž [1]: http://dev-builds.libreoffice.org/daily/master/Win-x86@6/2013-07-04_00.19.19/
Hello Tomaž Thanks a lot for your great job :) Here are some comments about Version: 4.2.0.0.alpha0+ Build ID: e703b429cf448deddc7682a33c3e6221889efe98 - Bug: when values are too big => wrong calculation. See attachment textXLS.XLS for a degree 3 polynomial equation, see ResultsXLS.png for curve and equation obtained in Excel 2003 - Bug: status bar does not update equation when changing degree: only degree=2, whatever the degree - Bug: it should not calculate equation if number of points <= degree (if 1 point, you cannot find a unique line going through this point) - UI: when increasing/decreasing Degree, autoselect polynomial type - Improvement: equation sould be formatted on several lines if equation is too long (with high degree)
Created attachment 82048 [details] Test case with big values Compare results obtained in LibO with those obtained in Excel 2003 (ResultsXLS.png)
Created attachment 82049 [details] Results obtained in Excel 2003 with textXLS.xls test file
Re, For TestXLS.xls test case, CorrelPolyGUI obtains similar results as Excel 2003.
@nonlinearx@freenet.de, would you mind do testing & giving some opinion regarding Tomaž's work? Rechanging version: to 3.5.0 Beta1 -> oldest release reported based on comment 6
(In reply to comment #11) > - Improvement: equation should be formatted on several lines if equation is > too long (with high degree) This improvement is especially important because, after leaving the editing mode of the chart, the whole chart gets scaled to make the equation line fit the allotted space for the chart. The result is a very small ("squashed") chart. This may spook users as the cause of this scaling may not be immediately obvious. Alternatively, the number formatting may be changed to include fewer digits. More space may be saved by using real superscripted exponents "²" instead of "^2"
Already thanks to everybody working on this important feature!
Hi, Version: 4.2.0.0.alpha0+ Build ID: 3d65dfa3c98e0f79c579cfac23d55092f7554244 TinderBox: Win-x86@47-TDF, Branch:master, Time: 2013-11-05_11:23:58 - Extrapolate Forwad/Backward does not accept scientific value - Force intercept value does accept scientific value, but treat them as normal value: 1E3 => 13
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=06d2d3290acb5dd3200481b85baf7c5718ea177c fdo#35712 Correct update of equation in status bar 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.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=eaa13b8b63f91ce432eea216a9c3afd54bac62a5 fdo#35712 fdo#40315 fdo#40314 Autoselect trendline type 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.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=78f227e1371ef4d11bc98e2116a3b95bb881b020&h=libreoffice-4-2 fdo#35712 fdo#40315 fdo#40314 Autoselect trendline type It will be available in LibreOffice 4.2. 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.
I think this can be set as resolved now.