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 sampling stagestage_sample_image.jl # Image-based scheme in the sampling stagestage_approx_int_distmat.jl # Calculating distance matrix in the approximate integration stagestage_dim_reduction.py # Dimensionality reduction stageglobal_set_common_func.py # Global parameter settings and common functions. A same file is located in the `dr_compare' folder for convenient accessing by the codes in that directory<i>Folders:</i><b>latlon-image</b> # Samples of latitude and Longitude input images for the image-based scheme<b>stage_sample_formula</b> # Samples of output JLD2 files for formula-based scheme in the sampling stage<b>stage_smaple_image</b> # Samples of output JLD2 files for image-based scheme in the sampling stage<b>stage_dr_iter</b> # Examples of iteration results of pre-DR to dimensionality 6 using SMACOF in the dimensionality reduction stage<b>dr_compare</b> # Codes for comparison of dimensionality reduction methods, including Principal Component Analysis (PCA), kernel PCA, Independent Component Analysis (ICA), Multidimensional Scaling (MDS), Scaling by MAjorizing a COmplicated Function (SMACOF), Locally Linear Embedding (LLE), t-distributed Stochastic Neighbor Embedding (t-SNE), Isometric Mapping (Isomap), Autoencoders, Spectral Embedding, Potential of Heat-diffusion for Affinity-based Trajectory Embedding (PHATE), Uni?form Manifold Approximation and Projection (UMAP), ivis, and node2vec, 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 integral metric 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 # Sample lines of multiple iteration outputs from dimensionality reduction using SMACOF - Isomap. Please note that not all output lines are included in this sample file.<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>30.864253812236182<br>14.15301065958934<br>./stage_sample_formula/arden v.s. ./stage_sample_formula/cabot=0.8~~~~~~<br>9.410581736653155<br>9.758357467327096<br>./stage_sample_formula/arden v.s. ./stage_sample_formula/cabot=1.0~~~~~~<br>5.173519093159532<br>7.240094823506276<br><b>[due to space limitation, some output not included here]</b><br>9.764416 seconds (401.67 k allocations: 38.417 GiB, 11.92% gc time, 1.80% compilation time)<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:00&lt;00:00, 429.60it/s]<br>Generating walks (CPU: 1): 100%|███████████████████████████████████████████████| 100/100 [00:02&lt;00:00, 38.12it/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.19 seconds.<br>Calculating KNN search...<br>Calculating affinities...<br>Calculated graph and diffusion operator in 0.21 seconds.<br>Calculating optimal t...<br>Automatically selected t = 12<br>Calculated optimal t in 0.06 seconds.<br>Calculating diffusion potential...<br>Calculating metric MDS...<br>Calculated metric MDS in 0.03 seconds.<br>Calculated PHATE in 0.31 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>