Skip to content

Commit

Permalink
update testing results
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Feb 16, 2021
1 parent 37a6bac commit 035bc2c
Show file tree
Hide file tree
Showing 9 changed files with 449 additions and 140 deletions.
236 changes: 116 additions & 120 deletions .idea/workspace.xml

Large diffs are not rendered by default.

67 changes: 62 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ Each test function will be executed 3 times, and the average executing time (in

* PySAL/ESDA without Numba (No multi-threading)

| Permutations | No multi-threading |
|--------------|--------------------|
| Permutations | No Numba |
|--------------|----------|
| 999 |0.5763969421386719 |
| 9999 | 2.856947898864746 |
| 99999 | 32.94658708572388 |

* PySAL/ESDA wit Numba
* PySAL/ESDA with Numba

| Permutations | Single Thread | 8 CPU Threads | 16 CPU Threads |
|--------------|---------------|---------------|----------------|
Expand Down Expand Up @@ -221,8 +221,22 @@ spdep uses multi-processing programming to parallel the local moran computation
| 9999 | 20.22104287147522 | 2.7842931747436523 | 2.2208046913146973| |
| 99999 | 278.66816306114197 | 29.182877779006958 | 23.67146110534668 | |


* PySAL/ESDA without Numba (No multi-threading)

| Permutations | No Numba |
|--------------|----------|
| 999 | 25.053487062454224 |
| 9999 | 77.59662580490112 |
| 99999 | (>64GB Memory usage) |

* rgeoda (permutation_method="complete")

| Permutations | Single Thread | 8 CPU Threads | 16 CPU Threads |
|--------------|---------------|---------------|----------------|
| 999 | 27.756 | 2.760 | 2.195 |
| 9999 | | | |
| 99999 | 1910.860 | 253.879 | 185.140 |

* spdep

Expand Down Expand Up @@ -260,10 +274,20 @@ spdep uses multi-processing programming to parallel the local moran computation

* PySAL/ESDA without Numba (No multi-threading)

The new Moran_Local() can't handle the islands and throws ValueError:
| Permutations | No Numba |
|--------------|----------|
| 999 ||
| 9999 | |
| 99999 | |

* rgeoda (permutation_method="complete")

| Permutations | Single Thread | 8 CPU Threads | 16 CPU Threads |
|--------------|---------------|---------------|----------------|
| 999 | 32.052 | 4.582 | 3.203 |
| 9999 | 319.400 | 43.551 | 31.251 |
| 99999 | 3262.898 | 432.714 | 319.074 |

* spdep

| Permutations | Not Use Core | 4 Cores | 8 CPU Cores|
Expand All @@ -285,12 +309,22 @@ The new Moran_Local() can't handle the islands and throws ValueError:
* pygeoda (permutation_method="complete")

(knn=20)

| Permutations | Single Thread | 8 CPU Threads | 16 CPU Threads | Average |
|--------------|---------------|---------------|----------------|---------|
| 999 | 389.7134437561035 | 57.798383951187134| 43.7291738986969 | |
| 9999 | 3842.998600959778 | 556.979868888855 | 436.6491787433624 | |
| 99999 | 53586.285209178925 | 1964.156000137329 | 1349.4739561080933 | |

(knn=10)

| Permutations | Single Thread | 8 CPU Threads | 16 CPU Threads | Average |
|--------------|---------------|---------------|----------------|---------|
| 999 | | | | |
| 9999 | | | | |
| 99999 | 13525.546596050262 | 1605.97736287117 | | |



* pygeoda (permutation_method="lookup-table")

Expand All @@ -300,5 +334,28 @@ The new Moran_Local() can't handle the islands and throws ValueError:
|--------------|---------------|---------------|----------------|---------|
| 999 | | | | |
| 9999 | | | | |
| 99999 | 3419.858710050583 | | 164.23768401145935 | |
| 99999 | | 191.051757812 | 164.23768401145935 | |

* PySAL/ESDA without Numba (No multi-threading)

| Permutations | No Numba |
|--------------|----------|
| 999 ||
| 9999 | |
| 99999 | |

* rgeoda (permutation_method="complete")

| Permutations | Single Thread | 8 CPU Threads | 16 CPU Threads |
|--------------|---------------|---------------|----------------|
| 999 | 128.734 | 16.890 | 13.451 |
| 9999 | 1269.854 | 162.848 | 121.514 |
| 99999 | 12497.949 | 1613.119 | 1318.064 |

* spdep

| Permutations | Not Use Core | 4 Cores | 8 CPU Cores|
|--------------|--------------|---------|------------|
| 999 | 1296.269 | 563.027 | |
| 9999 | | | |
| 99999 | | | |
File renamed without changes.
2 changes: 1 addition & 1 deletion perf_pysal.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

# function to execute and time
start_time = time.time()
li = esda.moran.Moran_Local(x, w, permutations=perms, n_jobs=cpu_threads, numba=True)
li = esda.moran.Moran_Local(x, w, permutations=perms, n_jobs=cpu_threads)
run_time = time.time() - start_time

print("{0} {1} {2}: {3} seconds".format(data_path, perms, cpu_threads, run_time))
4 changes: 4 additions & 0 deletions result_pygeoda_brutalforce_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ Test pyGeoDa local moran with Chicago_Parcels using permutation_method=brutal-fo
./data/Chicago_parcels_points.shp 99999 brutal-force 1: 53586.285209178925 seconds
./data/Chicago_parcels_points.shp 99999 brutal-force 8: 1964.156000137329 seconds
./data/Chicago_parcels_points.shp 99999 brutal-force 16: 1349.4739561080933 seconds
Test pyGeoDa local moran with Chicago_Parcels using permutation_method=brutal-force (knn=10 no duplicates)
./data/Chicago_parcels_points.shp 99999 brutal-force 1: 13525.546596050262 seconds
./data/Chicago_parcels_points.shp 99999 brutal-force 8: 1605.97736287117 seconds
./data/Chicago_parcels_points.shp 99999 brutal-force 16: 1161.3201611042023 seconds
15 changes: 5 additions & 10 deletions result_pygeoda_lookup_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ Test pyGeoDa local moran with NYC using permutation_method=lookup-table
./data/NYC_Area2010_2data.shp 99999 lookup-table 1: 656.4548988342285 seconds
./data/NYC_Area2010_2data.shp 99999 lookup-table 8: 62.88683271408081 seconds
./data/NYC_Area2010_2data.shp 99999 lookup-table 16: 48.3938422203064 seconds
Test pyGeoDa local moran with Chicago_Parcels using permutation_method=lookup-table
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 999 lookup-table 1
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 999 lookup-table 8
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 999 lookup-table 16
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 9999 lookup-table 1
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 9999 lookup-table 8
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 9999 lookup-table 16
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 99999 lookup-table 1
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 99999 lookup-table 8
python perf_pygeoda.py ./data/Chicago_parcels_points.shp EstBuild 99999 lookup-table 16
Test pyGeoDa local moran with Chicago_Parcels using permutation_method=brutal-force (knn=10 no duplicates)
./data/Chicago_parcels_points.shp 99999 lookup-table 1: 1449.7298228740692 seconds
./data/Chicago_parcels_points.shp 99999 lookup-table 8: 191.0517578125 seconds
./data/Chicago_parcels_points.shp 99999 lookup-table 16: 164.23768401145935 seconds
./data/Chicago_parcels_points.shp 9999 lookup-table 1: 140.48916697502136 seconds
9 changes: 5 additions & 4 deletions result_pysal_1.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Test pysal local moran with Natregimes without Numba
./data/natregimes.shp 999 1: 0.5935728549957275 seconds
./data/natregimes.shp 9999 1: 2.9768733978271484 seconds
./data/natregimes.shp 999 1: 0.5647399425506592 seconds
./data/natregimes.shp 9999 1: 2.7892000675201416 seconds
./data/natregimes.shp 99999 1: 31.00296425819397 seconds
Test pysal local moran with SDOH without Numba
Test pysal local moran with NYC without Numba
Test pysal local moran with Chicago_Parcels without Numba
./data/us-sdoh-2014.shp 999 1: 25.053487062454224 seconds
./data/us-sdoh-2014.shp 9999 1: 77.59662580490112 seconds
224 changes: 224 additions & 0 deletions result_rgeoda_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,227 @@ CRS: 4326
[1] "./data/us-sdoh-2014.shp" "ep_unem"
[3] "99999" "brutal-force"
[5] "1"
user system elapsed
1909.957 0.636 1910.860
Reading layer `us-sdoh-2014' from data source `/Users/xun/Github/libgeoda_paper/data/us-sdoh-2014.shp' using driver `ESRI Shapefile'
Simple feature collection with 71901 features and 25 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: -124.7625 ymin: 24.5231 xmax: -66.94989 ymax: 49.38436
CRS: 4326
[1] "./data/us-sdoh-2014.shp" "ep_unem"
[3] "99999" "brutal-force"
[5] "8"
user system elapsed
1990.640 0.897 253.879
Reading layer `us-sdoh-2014' from data source `/Users/xun/Github/libgeoda_paper/data/us-sdoh-2014.shp' using driver `ESRI Shapefile'
Simple feature collection with 71901 features and 25 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: -124.7625 ymin: 24.5231 xmax: -66.94989 ymax: 49.38436
CRS: 4326
[1] "./data/us-sdoh-2014.shp" "ep_unem"
[3] "99999" "brutal-force"
[5] "16"
user system elapsed
2895.849 3.208 185.140
====Run rgeoda local_moran using NYC and permutation_method=brutal-force
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "999" "brutal-force"
[5] "1"
user system elapsed
32.034 0.014 32.052
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "999" "brutal-force"
[5] "8"
user system elapsed
32.781 0.020 4.582
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "999" "brutal-force"
[5] "16"
user system elapsed
46.564 0.054 3.203
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "9999" "brutal-force"
[5] "1"
user system elapsed
319.245 0.107 319.400
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "9999" "brutal-force"
[5] "8"
user system elapsed
328.589 0.148 43.551
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "9999" "brutal-force"
[5] "16"
user system elapsed
476.452 0.472 31.251
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "99999" "brutal-force"
[5] "1"
user system elapsed
3261.370 1.056 3262.898
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "99999" "brutal-force"
[5] "8"
user system elapsed
3280.466 1.458 432.714
Reading layer `NYC_Area2010_2data' from data source `/Users/xun/Github/libgeoda_paper/data/NYC_Area2010_2data.shp' using driver `ESRI Shapefile'
Simple feature collection with 108487 features and 8 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: 1796733 ymin: 544070.8 xmax: 1991063 ymax: 677021.4
CRS: 102003
[1] "./data/NYC_Area2010_2data.shp" "CE01_02"
[3] "99999" "brutal-force"
[5] "16"
user system elapsed
4828.436 5.312 319.074
====Run rgeoda local_moran using Chicago_Parcels and permutation_method=brutal-force
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "999" "brutal-force"
[5] "1"
user system elapsed
128.653 0.058 128.734
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "999" "brutal-force"
[5] "8"
user system elapsed
129.874 0.075 16.890
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "999" "brutal-force"
[5] "16"
user system elapsed
200.916 0.217 13.451
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "9999" "brutal-force"
[5] "1"
user system elapsed
1269.245 0.427 1269.854
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "9999" "brutal-force"
[5] "8"
user system elapsed
1292.439 0.570 162.848
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "9999" "brutal-force"
[5] "16"
user system elapsed
1915.589 2.028 121.514
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "99999" "brutal-force"
[5] "1"
user system elapsed
12491.688 4.097 12497.949
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "99999" "brutal-force"
[5] "8"
user system elapsed
12869.904 4.523 1613.119
Reading layer `Chicago_parcels_points' from data source `/Users/xun/Github/libgeoda_paper/data/Chicago_parcels_points.shp' using driver `ESRI Shapefile'
Simple feature collection with 321701 features and 6 fields
geometry type: POINT
dimension: XY
bbox: xmin: -88.26351 ymin: 41.46987 xmax: -87.52488 ymax: 42.15398
CRS: 4326
[1] "./data/Chicago_parcels_points.shp" "EstBuild"
[3] "99999" "brutal-force"
[5] "16"
user system elapsed
20849.042 24.735 1318.064
Loading

0 comments on commit 035bc2c

Please sign in to comment.