update column names in tests

This commit is contained in:
Andy Eschbacher
2016-10-06 10:29:52 -04:00
parent da1449331c
commit c7e690980f
2 changed files with 9 additions and 10 deletions

View File

@@ -1,21 +1,21 @@
SET client_min_messages TO WARNING;
\set ECHO none
outlier|rowid
is_outlier|rowid
t|11
t|16
t|17
(3 rows)
outlier|rowid
is_outlier|rowid
t|16
t|17
(2 rows)
ERROR: Standard deviation of input data is zero
outlier|rowid
is_outlier|rowid
t|8
t|11
t|16
(3 rows)
outlier|rowid
is_outlier|rowid
t|8
t|9
t|11

View File

@@ -24,7 +24,7 @@ WITH a AS (
ORDER BY ids)
SELECT *
FROM b
WHERE outlier IS TRUE;
WHERE is_outlier IS TRUE;
-- With a threshold of 2.0 standard deviations, id 16 is the only outlier
WITH a AS (
@@ -38,7 +38,7 @@ WITH a AS (
ORDER BY ids)
SELECT *
FROM b
WHERE outlier IS TRUE;
WHERE is_outlier IS TRUE;
-- With a Stddev of zero, should throw back error
-- With a threshold of 2.0 standard deviations, id 16 is the only outlier
@@ -53,7 +53,7 @@ WITH a AS (
ORDER BY ids)
SELECT *
FROM b
WHERE outlier IS TRUE;
WHERE is_outlier IS TRUE;
-- With a ratio threshold of 2.0 threshold (100% above or below the mean)
-- which is greater than ~21, which are values
@@ -68,7 +68,7 @@ WITH a AS (
ORDER BY ids)
SELECT *
FROM b
WHERE outlier IS TRUE;
WHERE is_outlier IS TRUE;
-- With a static threshold of 11, what are the outliers
WITH a AS (
@@ -79,8 +79,7 @@ WITH a AS (
SELECT unnest(vals) As v, unnest(ids) as i
FROM a
)
SELECT cdb_crankshaft.CDB_StaticOutlier(v, 11.0) As outlier, i As rowid
SELECT cdb_crankshaft.CDB_StaticOutlier(v, 11.0) As is_outlier, i As rowid
FROM b
WHERE cdb_crankshaft.CDB_StaticOutlier(v, 11.0) is True
ORDER BY i;