adding pgsql tests
This commit is contained in:
parent
5127845100
commit
1d09eac3e7
23
src/pg/test/expected/16_getis_test.out
Normal file
23
src/pg/test/expected/16_getis_test.out
Normal file
@ -0,0 +1,23 @@
|
||||
\pset format unaligned
|
||||
\set ECHO all
|
||||
\i test/fixtures/ppoints.sql
|
||||
SET client_min_messages TO WARNING;
|
||||
\set ECHO none
|
||||
_cdb_random_seeds
|
||||
|
||||
(1 row)
|
||||
z_score|p_value
|
||||
-1.0358|0.0160
|
||||
-0.6404|0.0070
|
||||
2.6802|0.0190
|
||||
4.7529|0.0020
|
||||
2.7270|0.0250
|
||||
-1.2444|0.0230
|
||||
4.6322|0.0150
|
||||
4.5325|0.0220
|
||||
-1.3115|0.0090
|
||||
-1.3115|0.0080
|
||||
4.6361|0.0010
|
||||
2.8307|0.0310
|
||||
-1.3115|0.0020
|
||||
(13 rows)
|
13
src/pg/test/sql/16_getis_test.sql
Normal file
13
src/pg/test/sql/16_getis_test.sql
Normal file
@ -0,0 +1,13 @@
|
||||
\pset format unaligned
|
||||
\set ECHO all
|
||||
\i test/fixtures/getis_data.sql
|
||||
|
||||
-- set random seed
|
||||
SELECT cdb_crankshaft._cdb_random_seeds(1234);
|
||||
|
||||
-- test against PySAL example dataset
|
||||
SELECT z_score, p_val
|
||||
FROM cdb_crankshaft.CDB_GetisOrdsG(
|
||||
'select * from ppoints2',
|
||||
'ratio') As cdb_getisordsg(z_score, p_val, p_z_sim)
|
||||
WHERE p_val <= 0.05;
|
Loading…
Reference in New Issue
Block a user