From 3a2e5ec7f9dac1926095226ebcb1e167c81016d2 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 29 Jun 2016 16:06:34 +0200 Subject: [PATCH 1/2] Fix Markov trend_test that expects a bool #77 --- src/pg/test/sql/05_markov_test.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pg/test/sql/05_markov_test.sql b/src/pg/test/sql/05_markov_test.sql index 452fdc7..b2891f1 100644 --- a/src/pg/test/sql/05_markov_test.sql +++ b/src/pg/test/sql/05_markov_test.sql @@ -10,9 +10,9 @@ SELECT cdb_crankshaft._cdb_random_seeds(1234); SELECT m1.cartodb_id, - CASE WHEN m1.cartodb_id = 1 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 - WHEN m1.cartodb_id = 2 THEN abs(m2.trend - 0.15151515151515152) / 0.15151515151515152 - WHEN m1.cartodb_id = 3 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 + CASE WHEN m1.cartodb_id = 1 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 < 0.01 + WHEN m1.cartodb_id = 2 THEN abs(m2.trend - 0.15151515151515152) / 0.15151515151515152 < 0.01 + WHEN m1.cartodb_id = 3 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 < 0.01 ELSE NULL END As trend_test, CASE WHEN m1.cartodb_id = 1 THEN abs(m2.trend_up - 0.065217391304347824) / 0.065217391304347824 < 0.05 WHEN m1.cartodb_id = 2 THEN abs(m2.trend_up - 0.13157894736842105) / 0.13157894736842105 < 0.05 From 9e4d378a0890a7c60e886782d5373d6e84408304 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 29 Jun 2016 10:27:19 -0400 Subject: [PATCH 2/2] updates error bounds --- src/pg/test/sql/05_markov_test.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pg/test/sql/05_markov_test.sql b/src/pg/test/sql/05_markov_test.sql index b2891f1..2d7e667 100644 --- a/src/pg/test/sql/05_markov_test.sql +++ b/src/pg/test/sql/05_markov_test.sql @@ -10,9 +10,9 @@ SELECT cdb_crankshaft._cdb_random_seeds(1234); SELECT m1.cartodb_id, - CASE WHEN m1.cartodb_id = 1 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 < 0.01 - WHEN m1.cartodb_id = 2 THEN abs(m2.trend - 0.15151515151515152) / 0.15151515151515152 < 0.01 - WHEN m1.cartodb_id = 3 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 < 0.01 + CASE WHEN m1.cartodb_id = 1 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 < 0.05 + WHEN m1.cartodb_id = 2 THEN abs(m2.trend - 0.15151515151515152) / 0.15151515151515152 < 0.05 + WHEN m1.cartodb_id = 3 THEN abs(m2.trend - 0.069767441860465115) / 0.069767441860465115 < 0.05 ELSE NULL END As trend_test, CASE WHEN m1.cartodb_id = 1 THEN abs(m2.trend_up - 0.065217391304347824) / 0.065217391304347824 < 0.05 WHEN m1.cartodb_id = 2 THEN abs(m2.trend_up - 0.13157894736842105) / 0.13157894736842105 < 0.05