Representing similarities, distinctiveness, and features of map projections: An approach to dual sampling schemes, approximate integral computation, and dimensionality reductions
Creators: name: Yan, Jin
name: Zhang, Jun
name: Xu, TianSheng
name: Gao, Jing
name: Li, Ni
name: Gong, Guanghong
Publisher: name: figshare
Year: 2024
Subjects: classificationCode: 401301
subject: Cartography and digital mapping
classificationCode: 460306
subject: Image processing
classificationCode: 460807
subject: Information visualisation

description: <i>Source code:</i>stage_sample_formula.jl # Formula-based scheme in the first stagestage_sample_image.jl # Image-based scheme in the first stagestage_approx_int_distmat.jl # Calculating distance matrix in the second stagestage_dim_reduction.py # Dimensionality reduction in the second stage<i>Folders:</i><b>latlon-image</b> # Samples of latitude and Longitude images for the image-based scheme<b>stage_sample_formula</b> # Samples of output JLD2 files for formula-based scheme in the first stage<b>stage_smaple_image</b> # Samples of output JLD2 files for image-based scheme in the first stage<b>stage_dr_iter</b> # Examples of iteration results of dimensionality reduction in the second stage<b>dr_compare</b> # Codes for comparison of dimensionality reduction methods, or their combinations<i>Files:</i>distmat_Q_total_num_is_14.csv # Example of distance matrix $\mathbf{Q}$ as defined in Tobler (1986) for 14 map projectionsdistmat_D_total_num_is_14.csv # Example of distance matrix $\mathbf{D}$, an improved version of integration used in this study, for 14 map projectionsdistmat_D_total_num_is_345_with_distortion.csv # Distance matrix $\mathbf{D}$ for 345 map projections, with first two columns containing distortionsresult_345.txt # Samples of multiple iteration output of dimensionality reduction<br><i>Sample Stage: Formula-based scheme</i><b>PS C:\distance&gt; &amp; julia .\stage_sample_formula.jl</b>[512, 3145728]<br>arden~~~~~~<br>bertin1953~~~~~~<br>(-0.26020655450843494, -0.6852260581423438)<br>boggs~~~~~~<br>cabot=0.8~~~~~~<br>cabot=1.0~~~~~~<br>cabot=1.27~~~~~~<br>cabot=1.33~~~~~~<br>cabot=1.6~~~~~~<br>cabot=1.8~~~~~~<br>cabot=2.0~~~~~~<br>larr~~~~~~<br>mayr~~~~~~<br>merc~~~~~~<br>81.314381 seconds (505.70 M allocations: 20.491 GiB, 2.02% gc time, 4.70% compilation time: 4% of which was recompilation)<br><i>Sample Stage: Image-based scheme</i><b>PS C:\distance&gt; &amp; julia.exe .\stage_sample_image.jl</b>[512, 3145728]<br>bertin~~~~~~<br>32.116704 seconds (16.03 M allocations: 10.376 GiB, 6.85% gc time, 53.70% compilation time: &lt;1% of which was recompilation)<br>30.165952 seconds (266.45 k allocations: 6.245 GiB, 0.08% gc time, 0.32% compilation time)<br>boggs~~~~~~<br>11.672824 seconds (15.07 k allocations: 9.336 GiB, 11.91% gc time, 0.06% compilation time: 100% of which was recompilation)<br>35.197029 seconds (29 allocations: 6.454 GiB, 2.20% gc time)<br>127.414084 seconds (34.63 M allocations: 46.961 GiB, 4.50% gc time, 15.25% compilation time: &lt;1% of which was recompilation)<br><i>Approximate Integrals Calculation Stage: Calculate distance matrix</i><b>PS C:\distance&gt; &amp; julia.exe .\stage_approx_int_distmat.jl</b>[512, 3145728]<br>[12, 2, 14]<br>./stage_sample_formula/arden v.s. ./stage_sample_formula/bertin1953~~~~~~<br>2.567788 seconds (2.79 M allocations: 268.264 MiB, 2.25% gc time, 91.38% compilation time: 5% of which was recompilation)<br>0.456522 seconds (184 allocations: 138.743 MiB, 1.90% gc time)<br>30.864253812236182<br>14.15301065958934<br>./stage_sample_formula/arden v.s. ./stage_sample_formula/cabot=0.8~~~~~~<br>0.247594 seconds (190 allocations: 106.273 MiB, 7.17% gc time)<br>0.259103 seconds (190 allocations: 119.400 MiB, 2.45% gc time)<br>9.410581736653155<br>9.758357467327096<br>./stage_sample_formula/arden v.s. ./stage_sample_formula/cabot=1.0~~~~~~<br>0.234897 seconds (190 allocations: 106.273 MiB)<br>0.232637 seconds (187 allocations: 100.120 MiB, 3.38% gc time)<br>5.173519093159532<br>7.240094823506276<br><b>[due to space limitation, some output not included here]</b><br>91.243785 seconds (3.26 M allocations: 59.761 GiB, 5.50% gc time, 3.10% compilation time: 4% of which was recompilation)<br><br><i>Dimensionality Reduction </i><i>Stage with Multiple Iteration</i><b>PS C:\distance&gt; python .\stage_dim_reduction.py</b>(345, 347)<br>(345, 2)<br>(345, 345)<br>345<br>0.02104933076744079write csv: 0<br>0.020680825567365817<br>write csv: 1<br>0.02057085531406485<br>write csv: 20.021176700490530085<br>write csv: 3<br>0.0210250715492998<br>write csv: 4<br>0.02092652260654796write csv: 5<br>0.021223903879462973<br>write csv: 6<br>0.021038297528828402<br>write csv: 70.02086673552231143<br>write csv: 8<br>0.020723344630538126<br>write csv: 9<br><b>[due to space limitation, some output not included here]</b><br><i>Some Examples for Comparing Dimensionality Reduction </i><i>Methods</i><b>PS C:\distance&gt; python .\</b><b>dr_compare\isomap.py</b><br>(0.16649152972712097, 0.9456937431098922, (2.2461015961407127, 1.4273972870523786))<br><b>PS C:\distance&gt; python .\dr_compare\</b><sub><strong> </strong></sub><b>node2vec_isomap.py</b>Computing transition probabilities: 100%|█████████████████████████████████████| 345/345 [00:01&lt;00:00, 272.05it/s]<br>Generating walks (CPU: 1): 100%|███████████████████████████████████████████████| 100/100 [00:05&lt;00:00, 17.75it/s](0.5563975914101509, 0.9571046758624399, (2.2878575822781873, 1.0078650394309858))<b>PS C:\distance&gt; python .\dr_compare\phate_dr</b><b>.py</b>Calculating PHATE...<br> Running PHATE on 345 observations and 345 variables.<br> Calculating graph and diffusion operator...<br> Calculating PCA...<br> Calculated PCA in 0.34 seconds.<br> Calculating KNN search...<br> Calculated KNN search in 0.02 seconds.<br> Calculating affinities...<br> Calculated affinities in 0.01 seconds.<br> Calculated graph and diffusion operator in 0.37 seconds.<br> Calculating optimal t...<br> Automatically selected t = 12<br> Calculated optimal t in 0.11 seconds.<br> Calculating diffusion potential...<br> Calculating metric MDS...<br> Calculated metric MDS in 0.08 seconds.<br>Calculated PHATE in 0.57 seconds.<br>(0.5080569578181122, 0.9702693662445215, (2.006565702227926, 2.313734112816166))<br><br><b>[due to space limitation, not all comparison outputs are included here]</b>