GNOME Bugzilla – Bug 779177
Regression Equation with Date Axis
Last modified: 2018-05-22 13:09:17 UTC
Created attachment 346633 [details]
Graph that data and add a linear regression and an equation to go with that.
I see "0.00260507x-94.887".
That is, I'm sure, a correct equation, but in contains in it raw information
about the date system we use.
0.002507 makes sense: it is increment per day.
-94.889 does not: it is the predicted Y value for 1-Jan-1900. (Bearing in mind
that we have a hole in the date numbering where 1900-02-29 would have been
and that all date is after that hole, the right date is probably 1899-Dec-31.)
I think we would be better off presenting the result as
We clearly need to add a format to the equation (and may be even a format for each coefficient).
The other way might be to retrieve the preferred format for the x values, unfortunately, it is not currently possible from the reg curves code. We would need an ABI break, at least (we need a new method in GogSeriesClass).
It would definitely be useful to have a way to format values used in the
equation. I don't think it will be very useful to use the X axis format,
though: in y=ax+b, b in units of the Y axis and a is in units of Y/X.
For regressions other than linear regression it is even more complicated.
However, we would need access to the X axis to do the change I mentioned
in the initial report. We would need to check that
gog_axis_is_zero_important(axis) == FALSE
before applying the offset-x method.
-- GitLab Migration Automatic Message --
This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/goffice/issues/41.