From d1dfab803da706bb80a867d433bc839bb4ca33fc Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Thu, 21 Oct 2010 08:42:46 -0400 Subject: [PATCH] fractions regression --- tests/linear-regression-addseries.html | 4 + tests/linear-regression-fractions.html | 136 +++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 tests/linear-regression-fractions.html diff --git a/tests/linear-regression-addseries.html b/tests/linear-regression-addseries.html index 2a746b5..3fd3a85 100644 --- a/tests/linear-regression-addseries.html +++ b/tests/linear-regression-addseries.html @@ -61,6 +61,10 @@ var y = data[i][series]; if (y == null) continue; + if (y.length == 2) { + // using fractions + y = y[0] / y[1]; + } num++; sum_x += x; diff --git a/tests/linear-regression-fractions.html b/tests/linear-regression-fractions.html new file mode 100644 index 0000000..6ccc94e --- /dev/null +++ b/tests/linear-regression-fractions.html @@ -0,0 +1,136 @@ + + + Linear Regression + + + + + + + + +

Linear Regression Demo

+

Click the buttons to generate linear regressions over either data + series. If you zoom in and click the regression button, the regression will + only be run over visible points. Zoom back out to see what the local + regression looks like over the full data.

+ +
+ + + +
+ +

+ +

+ +
+ + -- 2.7.4