├── .github └── workflows │ └── python-package.yml ├── .gitignore ├── LICENSE ├── README.md ├── assets ├── The_estimation_process_of_GNNWR_model.jpeg ├── The_estimation_process_of_GTNNWR_model.jpeg ├── The_proposed_GNNWR_model.jpeg ├── figure OSP.JPG ├── figure_CatGWR.jpg ├── figure_DSI.jpg ├── figure_HousePrice.png ├── figure_LST.png ├── figure_NO2.png ├── figure_PM25.png ├── figure_SHF.jpg ├── figure_WaterQuality.jpg └── figure_mine.jpg ├── data ├── co2_gnnwr.csv ├── co2_gnnwr_pre.csv ├── co2_gtnnwr.csv ├── co2_gtnnwr_predict.csv ├── demo_data_gtnnwr.csv ├── demo_predict_data.csv ├── distances.csv ├── pm25_data.csv ├── pm25_predict_data.csv ├── simulated_data.csv └── simulated_predict_data.csv ├── demo ├── China.json ├── demo_gnnwr.ipynb ├── demo_gtnnwr.ipynb ├── demo_result │ └── gnnwr_datasets │ │ ├── test_dataset │ │ ├── dataframe.csv │ │ ├── dataset_info.json │ │ ├── distances.npy │ │ └── scaledDataframe.csv │ │ ├── train_dataset │ │ ├── dataframe.csv │ │ ├── dataset_info.json │ │ ├── distances.npy │ │ └── scaledDataframe.csv │ │ └── val_dataset │ │ ├── dataframe.csv │ │ ├── dataset_info.json │ │ ├── distances.npy │ │ └── scaledDataframe.csv ├── demo_utils.py └── result.csv ├── demo_result ├── GNNWR_PM25_Result.csv ├── gnnwr_datasets │ ├── test_dataset │ │ ├── dataframe.csv │ │ ├── dataset_info.json │ │ ├── distances.npy │ │ └── scaledDataframe.csv │ ├── train_dataset │ │ ├── dataframe.csv │ │ ├── dataset_info.json │ │ ├── distances.npy │ │ └── scaledDataframe.csv │ └── val_dataset │ │ ├── dataframe.csv │ │ ├── dataset_info.json │ │ ├── distances.npy │ │ └── scaledDataframe.csv ├── gnnwr_models │ └── GNNWR_PM25.pkl └── gtnnwr_models │ └── GTNNWR_DSi.pkl ├── doc ├── Makefile ├── build │ ├── doctrees │ │ ├── environment.pickle │ │ └── index.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _sources │ │ └── index.rst.txt │ │ ├── _static │ │ ├── _sphinx_javascript_frameworks_compat.js │ │ ├── basic.css │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── fonts │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ ├── lato-normal.woff │ │ │ │ └── lato-normal.woff2 │ │ │ └── theme.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── jquery.js │ │ ├── js │ │ │ ├── badge_only.js │ │ │ ├── html5shiv-printshiv.min.js │ │ │ ├── html5shiv.min.js │ │ │ └── theme.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ └── sphinx_highlight.js │ │ ├── genindex.html │ │ ├── index.html │ │ ├── objects.inv │ │ ├── py-modindex.html │ │ ├── search.html │ │ └── searchindex.js ├── make.bat └── source │ ├── conf.py │ └── index.rst ├── requirements.txt └── src └── gnnwr ├── __init__.py ├── datasets.py ├── models.py ├── networks.py └── utils.py /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python 3 | 4 | name: Python package 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | python-version: ["3.9", "3.10", "3.11"] 20 | 21 | steps: 22 | - uses: actions/checkout@v3 23 | - name: Set up Python ${{ matrix.python-version }} 24 | uses: actions/setup-python@v3 25 | with: 26 | python-version: ${{ matrix.python-version }} 27 | - name: Install dependencies 28 | run: | 29 | python -m pip install --upgrade pip 30 | python -m pip install flake8 pytest 31 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 32 | - name: Lint with flake8 33 | run: | 34 | # stop the build if there are Python syntax errors or undefined names 35 | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 36 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide 37 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.pkl 3 | *.egg-info 4 | **/__pycache__ 5 | *_logs/ 6 | *_runs/ 7 | *_models/ 8 | dist/ 9 | *.toml 10 | *.log -------------------------------------------------------------------------------- /assets/The_estimation_process_of_GNNWR_model.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/The_estimation_process_of_GNNWR_model.jpeg -------------------------------------------------------------------------------- /assets/The_estimation_process_of_GTNNWR_model.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/The_estimation_process_of_GTNNWR_model.jpeg -------------------------------------------------------------------------------- /assets/The_proposed_GNNWR_model.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/The_proposed_GNNWR_model.jpeg -------------------------------------------------------------------------------- /assets/figure OSP.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure OSP.JPG -------------------------------------------------------------------------------- /assets/figure_CatGWR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_CatGWR.jpg -------------------------------------------------------------------------------- /assets/figure_DSI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_DSI.jpg -------------------------------------------------------------------------------- /assets/figure_HousePrice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_HousePrice.png -------------------------------------------------------------------------------- /assets/figure_LST.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_LST.png -------------------------------------------------------------------------------- /assets/figure_NO2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_NO2.png -------------------------------------------------------------------------------- /assets/figure_PM25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_PM25.png -------------------------------------------------------------------------------- /assets/figure_SHF.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_SHF.jpg -------------------------------------------------------------------------------- /assets/figure_WaterQuality.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_WaterQuality.jpg -------------------------------------------------------------------------------- /assets/figure_mine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/assets/figure_mine.jpg -------------------------------------------------------------------------------- /data/co2_gnnwr_pre.csv: -------------------------------------------------------------------------------- 1 | fCO2,Chl,Temp,Salt,lon,lat 2 | 427.0227273,0.856589258,10.52290344,33.00970346,235.125,42.875 3 | 482.8573846,0.774920166,10.57967758,33.03273696,234.875,42.625 4 | 433.9548571,0.813277543,10.60032272,33.04260588,234.875,42.375 5 | 433.3903939,0.800426304,10.63806438,33.0054965,234.875,42.125 6 | 413.1546774,0.777915537,10.67838669,32.96838713,234.875,41.875 7 | 418.4410652,0.800702929,10.74354839,32.93127775,234.875,41.625 8 | 431.512,0.762529731,10.84354782,32.91182047,234.875,41.375 9 | 422.6084318,0.772762179,10.93870926,32.91001529,234.875,41.125 10 | 454.153,0.845942974,11.00290298,32.98121208,235.125,41.125 11 | 443.8956667,0.83403188,10.99903202,32.9082101,234.875,40.875 12 | 342.8012058,0.467087626,12.53903198,33.95320386,141.375,37.875 13 | 344.6948889,0.383636236,12.38967705,33.99945909,141.625,37.875 14 | 407.1016667,0.669980228,11.81645107,33.12304574,236.375,37.875 15 | 334.791104,0.737642646,12.71354771,33.95206183,141.125,37.625 16 | 343.1821411,0.363651812,12.30128956,34.06920618,141.625,37.625 17 | 448.7936667,0.648809254,12.06774139,33.15285105,236.375,37.625 18 | 398.4516154,0.817402661,11.91645145,33.16836315,236.625,37.625 19 | 340.8363916,0.636316538,12.85290337,34.00788277,141.125,37.375 20 | 343.3762396,0.395199537,12.58903217,34.07002074,141.375,37.375 21 | 344.1905,0.348403126,12.30709648,34.1321587,141.625,37.375 22 | 356.1563111,0.203659728,22.11903191,34.68532681,139.875,34.375 23 | 403.7620245,1.215404987,13.84741879,33.58872443,239.125,34.375 24 | 346.895102,0.752910435,18.07999992,34.29105127,134.875,34.125 25 | 350.4395,0.171294987,22.86128998,34.60141844,138.125,34.125 26 | 350.914,0.180465087,22.7048378,34.61788541,138.375,34.125 27 | 355.854725,0.191437185,22.54709625,34.70392203,139.875,34.125 28 | 358.82,0.183892593,22.67709541,34.71132851,140.125,34.125 29 | 345.4965469,0.57190752,19.77290344,34.4065897,134.875,33.875 30 | 350.745,0.149422735,23.21645164,34.61241102,137.875,33.875 31 | 348.6580909,0.157815263,23.21967697,34.63668877,138.125,33.875 32 | 356.8606667,0.172732502,22.92290306,34.72852325,140.125,33.875 33 | 348.34304,0.213239476,21.04935455,34.53023609,134.875,33.625 34 | 350.8944783,0.24293901,21.25290298,34.53382105,135.125,33.625 35 | 348.2677143,0.148660839,23.1506443,34.63910341,137.625,33.625 36 | 355.4448333,0.165596977,22.9593544,34.745718,140.125,33.625 37 | 350.4318472,0.268164515,21.71225739,34.60033715,135.125,33.375 38 | 349.0333333,0.131604359,22.82032204,34.68610948,137.625,33.375 39 | 357.4286458,0.159946889,22.9074192,34.76255691,140.125,33.375 40 | -------------------------------------------------------------------------------- /data/co2_gtnnwr_predict.csv: -------------------------------------------------------------------------------- 1 | lon,lat,year,month,pCO2,Chl,Temp,Salt,pressure,windspeed 2 | 137.125,24.125,2017,12,360.3644782,0.069610618,25.33290291,35.08836979,101694.8438,6.942487717 3 | 158.625,24.125,2017,12,363.3236339,0.038444016,26.7003212,35.27006209,101648.3594,3.680241108 4 | 139.625,34.625,2017,12,350.6549305,0.232888371,19.40999985,34.59415086,101675.5,6.144190788 5 | 146.125,14.875,2017,12,384.5523636,0.027751578,29.06419373,34.62786102,101040.0625,7.528096199 6 | 132.625,23.625,2017,12,361.5291526,0.087183975,26.06903076,34.95102084,101753.2344,8.035316467 7 | 235.125,3.375,2017,12,393.5187284,0.14312391,25.67870903,34.71591496,101114.3438,7.089426994 8 | 136.625,32.625,2017,12,332.0239535,0.262908638,18.86322594,34.69547558,101992.7344,6.255911827 9 | 146.625,31.875,2017,12,340.7107161,0.170262173,20.9525795,34.85557908,101637.1094,4.741209507 10 | 145.125,34.375,2017,12,337.9106307,0.1905808,20.70387077,34.72746843,101545.6719,4.393471718 11 | 223.125,15.625,2017,12,385.4421553,0.063249685,26.44257927,34.11986077,101280.3906,6.82899189 12 | 235.125,3.125,2017,12,390.8087289,0.141454712,25.65903091,34.71805453,101118.2813,7.123773575 13 | 155.125,24.125,2017,12,366.0023884,0.036263641,27.25580597,35.19367456,101593.7969,3.28802824 14 | 142.875,22.875,2017,12,378.0035414,0.0563206,26.11580658,34.90442044,101478.1094,6.069850445 15 | 167.875,24.125,2017,12,356.2858872,0.041513536,25.66386986,35.40412551,101786.4922,4.661588669 16 | 238.625,14.375,2017,12,376.2255019,0.098754846,27.2387085,33.6868096,101265.75,6.93921566 17 | 147.125,39.375,2017,12,338.6203532,0.258557081,13.9393549,34.34861171,101332.2188,6.787261963 18 | 142.375,25.375,2017,12,362.6927772,0.113986269,24.68806458,34.95639223,101673.9766,5.492742062 19 | 145.125,33.125,2017,12,338.7587132,0.140975863,20.70548248,34.80599016,101599.2031,5.264705658 20 | 182.625,21.875,2017,12,356.8777558,0.042749427,25.54645157,35.26803041,101723.5703,6.780557632 21 | 156.375,24.375,2017,12,370.4792814,0.035669442,27.09032249,35.2368142,101620.2813,3.19272995 22 | 152.375,24.125,2017,12,368.0701816,0.038992964,26.89225769,35.1623612,101556.6563,2.959062576 23 | -------------------------------------------------------------------------------- /data/demo_predict_data.csv: -------------------------------------------------------------------------------- 1 | refl_b01,refl_b02,refl_b03,refl_b04,refl_b05,refl_b07,proj_x,proj_y,day,SiO3 2 | 7307,4191,7179,7808,8596,4352,655316.4743,3169638.04,218,3.9339 3 | 6977,7092,6456,6732,6632,4263,745209.1898,3405417.957,86,0.981 4 | 3719,4197,4460,4646,6180,3812,634452.3503,3176485.716,285,3.29 5 | 5094,5256,4669,4925,5111,4042,594309.4734,3377306.381,86,2.374 6 | 3087,3154,3424,3858,5025,2614,673075.8424,3236376.035,238,1.34 7 | 4901,4234,4911,5367,4778,2483,701234.5705,3393963.738,217,2.107 8 | 4684,4841,4189,4453,4535,3844,589927.3812,3362766.673,86,2.267 9 | 4017,4448,3310,3839,4513,4147,637486.4286,3041933.072,215,0.364 10 | 3182,3547,3219,3468,4506,3338,668124.346,3272408.794,149,0.545 11 | 4338,4446,3962,4166,4124,3695,599914.5933,3369118.335,86,2.66 12 | 3541,3508,3590,3951,3874,2354,668124.346,3272408.794,232,1.33 13 | 1108,3002,985,1290,3511,1422,604102.1683,3096345.316,283,1.874 14 | 3133,3219,3056,3276,3384,2376,610574.3847,3116842.414,218,1.482 15 | 3528,3849,3579,3812,3359,1365,662778.0726,3214978.728,226,0.062 16 | 3776,3750,3427,3641,3340,2977,649913.7516,3396454.274,139,2.044 17 | 2505,3514,1643,2020,3297,3171,612954.1788,3083135.5,204,0.723 18 | 3501,3911,3391,3599,3282,2783,560812.2239,3074326.724,284,4.042 19 | 2769,3334,2383,2663,3254,2247,674781.9797,3243721.131,218,0.777 20 | 4387,4307,3877,4078,3234,2963,694640.1601,3227895.54,296,1.484 21 | 4716,4724,4852,4753,3209,2741,657968.2739,3150670.02,125,1.322 22 | 2054,2317,2544,2536,3122,1866,673430.2695,3269106.894,189,1.57 23 | 2925,3064,2505,3032,3108,2837,616929.2599,3043593.033,215,0.543 24 | 2609,2647,3363,3201,3007,2397,663374.6203,3269666.313,264,1.25 25 | 3296,3334,3186,3290,2948,2654,654216.0245,3229241.81,75,0.992 26 | 1826,1759,1685,1923,2867,2343,648944.2369,3260928.196,203,1.93 27 | 3338,3290,2959,3153,2826,2547,672666.3438,3387844.288,139,1.792 28 | 4621,4656,3996,4268,2767,1809,667997.2447,3271830.237,232,1.347 29 | 3244,3225,2895,3073,2682,2307,653626.211,3376709.928,139,1.904 30 | 1310,2976,1186,1449,2667,978,604968.4339,3039239.99,216,0.425 31 | 2459,3025,2433,2562,2655,1841,650014.4339,3211933.353,223,1.218 32 | 1022,2408,1079,1167,2609,905,615664.9856,3137796.494,73,1.6009 33 | 3018,3536,2736,2903,2608,1150,659611.8986,3215632.881,226,0.044 34 | 1878,1219,1922,2031,2542,1469,685044.3039,3316184.464,250,1.78 35 | 3250,3618,2707,2994,2520,1959,670765.7849,3270851.643,216,1.46 36 | 3333,3218,2887,3095,2516,2276,663108.4829,3372023.964,139,1.831 37 | 2005,2432,1633,2030,2511,2628,614287.8357,3083779.837,204,0.753 38 | 2018,2345,2081,2182,2506,1532,650014.4339,3211933.353,283,1.715 39 | 822,3083,721,1012,2499,836,667864.7833,3228935.065,240,1.67 40 | 843,2013,763,957,2497,690,674781.9797,3243721.131,240,2.271 41 | 2245,2038,2414,2562,2458,1958,616040.5049,3084882.797,188,0.377 42 | 3128,3008,2806,2949,2444,2273,644484.7449,3387419.124,139,2.478 43 | 1182,1677,1420,1486,2421,888,612410.1986,3105475.959,128,0.934 44 | 3098,3121,3385,3533,2398,2381,791558.0435,3368365.005,305,0.286 45 | 1614,2094,1469,1609,2389,1465,673075.8424,3236376.035,62,1.029 46 | 1445,2002,1052,1365,2376,705,702665.9821,3319199.518,125,1.517 47 | 1608,1914,1558,1815,2371,2048,612954.1788,3083135.5,188,0.666 48 | 2231,2140,2018,2362,2298,1951,612944.2249,3083146.491,229,0.757 49 | 2931,3044,2779,2960,2297,1838,614287.8357,3083779.837,188,0.519 50 | 1091,2414,1000,1214,2281,961,746053.0935,3397446.981,293,1.715 51 | 724,1835,418,701,2281,664,618790.0819,3135178.155,217,1.935 52 | -------------------------------------------------------------------------------- /data/simulated_predict_data.csv: -------------------------------------------------------------------------------- 1 | id,u,v,x1,x2,y 2 | 501,0.5,10,0.009373205,0.844289522,3.624995146 3 | 502,1,10,0.983223643,0.702809415,5.883498273 4 | 503,1.5,10,0.568145968,0.20618636,4.287319686 5 | 504,2,10,0.755833589,0.917192023,6.442310078 6 | 505,2.5,10,0.097780678,0.441362595,2.250438852 7 | 506,3,10,0.946014077,0.779715936,4.851324098 8 | 507,3.5,10,0.767575133,0.166277868,3.079060762 9 | 508,4,10,0.922601995,0.3271999,4.439702052 10 | 509,4.5,10,0.245550549,0.003911075,2.538876362 11 | 510,5,10,0.569721527,0.135334049,3.930139604 12 | 511,5.5,10,0.318721852,0.173948051,3.84640703 13 | 512,6,10,0.404192704,0.366516822,5.040751241 14 | 513,6.5,10,0.388325293,0.20871077,4.112642912 15 | 514,7,10,0.895638133,0.303452619,4.760791356 16 | 515,7.5,10,0.024241027,0.487144309,3.348399962 17 | 516,8,10,0.524515338,0.998976845,4.888057664 18 | 517,8.5,10,0.930693291,0.570368271,4.507037881 19 | 518,9,10,0.17337325,0.372996267,2.632848406 20 | 519,9.5,10,0.420807103,0.955106905,5.733531552 21 | 520,10,10,0.791452937,0.191430248,4.51415676 22 | 521,10.5,10,0.98796397,0.001042992,5.151963196 23 | 522,11,10,0.883006482,0.188375005,6.172580524 24 | 523,11.5,10,0.360902351,0.162244913,3.271914617 25 | 524,12,10,0.321770115,0.490596922,3.982851772 26 | 525,0,10.5,0.547776152,0.64613689,2.779471245 27 | 526,0.5,10.5,0.967425159,0.210558775,4.2574525 28 | 527,1,10.5,0.355590653,0.087571888,3.558373194 29 | 528,1.5,10.5,0.614096127,0.742460665,5.151906741 30 | 529,2,10.5,0.929921145,0.725828116,5.698555487 31 | 530,2.5,10.5,0.438174933,0.938598545,5.473347292 32 | 531,3,10.5,0.957950386,0.014775456,3.30437948 33 | 532,3.5,10.5,0.742829465,0.718617471,4.776627546 34 | 533,4,10.5,0.465113451,0.851424559,3.75200524 35 | 534,4.5,10.5,0.481978148,0.58269728,3.97515251 36 | 535,5,10.5,0.419320417,0.637481914,4.866383996 37 | 536,5.5,10.5,0.891055555,0.680095555,6.150332756 38 | 537,6,10.5,0.399794582,0.009154159,4.019061898 39 | 538,6.5,10.5,0.472688505,0.502036143,4.57233541 40 | 539,7,10.5,0.819536325,0.195029827,3.564393891 41 | 540,7.5,10.5,0.467689719,0.852543249,4.651971528 42 | 541,8,10.5,0.359847341,0.07925111,1.794921392 43 | 542,8.5,10.5,1,0.201873296,3.566081317 44 | 543,9,10.5,0.859400741,0.30495259,4.697968254 45 | 544,9.5,10.5,0.452433694,0.44921348,3.532043887 46 | 545,10,10.5,0.443310369,0.278496679,4.447848783 47 | 546,10.5,10.5,0.814606107,0.142435258,5.568184553 48 | 547,11,10.5,0.846586381,0.620064643,4.57728101 49 | 548,11.5,10.5,0.784865925,0.515102424,5.258582827 50 | 549,12,10.5,0.227059024,0.162587984,1.908997483 51 | 550,0,11,0.505994492,0.505259352,2.035850549 52 | 551,0.5,11,0.580356465,0.867421774,3.11869323 53 | 552,1,11,0.807629957,0.655388566,4.771923298 54 | 553,1.5,11,0.09298601,0.946484653,3.860979871 55 | 554,2,11,0.572298043,0.545448681,4.810557096 56 | 555,2.5,11,0.48734306,0.858902286,5.209252881 57 | 556,3,11,0.622165279,0.487147008,4.587528527 58 | 557,3.5,11,0.526418696,0.982924592,3.686192105 59 | 558,4,11,0.198501484,0.952871712,3.346215986 60 | 559,4.5,11,0.667703084,0.656163878,3.577181353 61 | 560,5,11,0.551886573,0.956984965,3.957019578 62 | 561,5.5,11,0.343225634,0.656802984,5.186773257 63 | 562,6,11,0.403296072,0.444919692,5.010214578 64 | 563,6.5,11,0.408420048,0.120138598,3.81141861 65 | 564,7,11,0.793259074,0.170960277,4.258058844 66 | 565,7.5,11,0.557565877,0.928157827,4.469135469 67 | 566,8,11,0.830485884,0.413186237,4.012075495 68 | 567,8.5,11,0.895488007,0.944564909,5.56272412 69 | 568,9,11,0.351366593,0.275091445,3.520058715 70 | 569,9.5,11,0.938238211,0.643410995,5.564479581 71 | 570,10,11,0.579471743,0.641370869,4.945001723 72 | 571,10.5,11,0.129095299,0.964071939,4.527845229 73 | 572,11,11,0.511862179,0.438618038,4.069992267 74 | 573,11.5,11,0.628113299,0.522096263,3.000634867 75 | 574,12,11,0.541379968,0.779044159,3.510274743 76 | 575,0,11.5,0.521911996,0.880757038,3.358601526 77 | 576,0.5,11.5,0.257077953,0.678993081,2.823866901 78 | 577,1,11.5,0.964259085,0.419254012,3.441902751 79 | 578,1.5,11.5,0.329168628,0.979489767,3.505698915 80 | 579,2,11.5,0.123117148,0.573714884,3.81778918 81 | 580,2.5,11.5,0.1281847,0.406921335,4.333711404 82 | 581,3,11.5,0.176259047,0.658892062,3.363073338 83 | 582,3.5,11.5,0.538831251,0.524608521,3.101815928 84 | 583,4,11.5,0.212019024,0.128606674,1.907022323 85 | 584,4.5,11.5,0.104416665,0.128221578,1.627451906 86 | 585,5,11.5,0.185740484,0.092575057,2.119825747 87 | 586,5.5,11.5,0.904986637,0.799125254,5.187573852 88 | 587,6,11.5,0.108594459,0.600568005,4.526495933 89 | 588,6.5,11.5,0.018006644,0.222697628,3.199332531 90 | 589,7,11.5,0.026622499,0.402221494,2.502085677 91 | 590,7.5,11.5,0.760342269,0.586336902,3.658768599 92 | 591,8,11.5,0.361738562,0.55358032,3.089946102 93 | 592,8.5,11.5,0.121771702,0.617636817,2.573296491 94 | 593,9,11.5,0.714855426,0.055551348,3.826289291 95 | 594,9.5,11.5,0.260094351,0.240020847,3.847635256 96 | 595,10,11.5,0.432169115,0.664633243,4.666263792 97 | 596,10.5,11.5,0.447252393,0.854600386,3.699198084 98 | 597,11,11.5,0.289648709,0.122016626,2.246912231 99 | 598,11.5,11.5,0.22167976,0.615744295,2.196029352 100 | 599,12,11.5,0.016419534,0.625294821,2.365323404 101 | 600,0,12,0.462232371,0.490021139,3.943223782 102 | 601,0.5,12,0.043135984,0.931827444,2.627929815 103 | 602,1,12,0.812838277,0.102325726,2.348446438 104 | 603,1.5,12,0.318834856,0.654895267,2.618262131 105 | 604,2,12,0.602204108,0.428934108,4.572230817 106 | 605,2.5,12,0.805727927,0.608419483,6.169200619 107 | 606,3,12,0.047826895,0.029666078,3.205680875 108 | 607,3.5,12,0.941611533,0.627484888,6.072980244 109 | 608,4,12,0.506338064,0.973627807,2.870961289 110 | 609,4.5,12,0.305632932,0.386814847,1.993918664 111 | 610,5,12,0.665021015,0.596043074,3.14097218 112 | 611,5.5,12,0.833240299,0.013631583,4.695036093 113 | 612,6,12,0.939731365,0.348459223,4.96685926 114 | 613,6.5,12,0.558127581,0.794501797,5.183101194 115 | 614,7,12,0.065545397,0.920844903,3.632567553 116 | 615,7.5,12,0.871819685,0.121248508,3.253786655 117 | 616,8,12,0.922814857,0.55267766,2.549960768 118 | 617,8.5,12,0.746621521,0.648375723,4.40440265 119 | 618,9,12,0.334495419,0.930841491,5.611345858 120 | 619,9.5,12,0.270547417,0.824494591,3.407457727 121 | 620,10,12,0.753266218,0.29811746,4.374270256 122 | 621,10.5,12,0.545090802,0.963122748,4.22092089 123 | 622,11,12,0.015637061,0.010520117,0.51947064 124 | 623,11.5,12,0.35264677,0.444586743,3.147800306 125 | 624,12,12,0.360385522,0.236455,3.664159341 126 | -------------------------------------------------------------------------------- /demo/demo_result/gnnwr_datasets/test_dataset/distances.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo/demo_result/gnnwr_datasets/test_dataset/distances.npy -------------------------------------------------------------------------------- /demo/demo_result/gnnwr_datasets/test_dataset/scaledDataframe.csv: -------------------------------------------------------------------------------- 1 | dem,w10,d10,t2m,aod_sat,tp,PM2_5 2 | 0.037790056,0.22971217,0.6821386,0.57790256,0.7346226,0.24202037,48.145428 3 | 0.015690608,0.11254407,0.9336648,0.76121116,0.78013927,0.6052365,39.570225 4 | 0.020773482,0.16139531,0.9905356,0.70426536,0.7571689,0.4774832,54.218487 5 | 0.020773482,0.09075915,0.6767759,0.6670263,0.7738229,0.44556212,51.8125 6 | 0.0077348067,0.36934793,0.5917115,0.6116712,0.75109255,0.2533248,51.10704 7 | 0.0035359114,0.12478388,0.96224165,0.75763965,0.47560602,0.56941503,31.108147 8 | 0.008618785,0.2458671,0.8785335,0.80161834,0.5312775,0.59241754,34.526836 9 | 0.037127074,0.09948701,0.5838083,0.6517112,0.7265255,0.25426808,64.64326 10 | 0.42850828,0.41612598,0.0043087793,0.66218543,0.23243372,0.75575763,25.847221 11 | 0.0050828727,0.23438759,0.744867,0.9218519,0.50863814,0.7677022,35.908962 12 | 0.0022099447,0.22724396,0.71214616,0.9223621,0.47112823,0.76208234,39.634453 13 | 0.007955802,0.263839,0.7045643,0.6747587,0.77425134,0.52865845,51.211483 14 | 0.02519337,0.17160764,0.75863016,0.7764404,0.64995724,0.7714582,47.670868 15 | 0.006187845,0.20148952,0.5298404,0.5832422,0.5892914,0.21348523,30.67 16 | 0.085524864,0.26384255,0.90772647,0.71879077,0.6271656,0.47476545,34.786705 17 | 0.2114917,0.21019053,0.97827154,0.6320522,0.17930815,0.025941378,52.894814 18 | 0.09281768,0.22420019,0.5170253,0.60864043,0.5444309,0.32206732,66.77361 19 | 0.0019889502,0.3494133,0.7269588,0.69061923,0.6760399,0.46713835,46.647728 20 | 0.032265194,0.24927825,0.17847095,0.24817918,0.27298337,0.17869376,22.256338 21 | 0.023425415,0.2541527,0.51041436,0.37089798,0.45670724,0.27579147,29.606945 22 | 0.11690608,0.22376211,0.14914098,0.36390945,0.39074636,0.14704087,35.10585 23 | 0.016132597,0.23611376,0.76295245,0.73141074,0.7149701,0.6527285,40.850975 24 | 0.0718232,0.16793653,0.36268696,0.79961085,0.933148,0.2905193,50.481792 25 | 0.03447514,0.25002664,0.23737763,0.3126714,0.28097624,0.14026582,27.693083 26 | 0.2355801,0.21854562,0.45146218,0.37658855,0.33822063,0.1662106,47.6156 27 | 0.033370167,0.384588,0.12597509,0.22823022,0.35503632,0.17122181,35.66852 28 | 0.39292818,0.393421,0.6398387,0.42241928,0.25868693,0.23677246,27.502832 29 | 0.0092817675,0.32826632,0.6706708,0.648545,0.74104226,0.40613815,63.681305 30 | 0.0024309393,0.36172593,0.78203106,0.9012897,0.35311803,0.56585515,29.837048 31 | 0.0030939225,0.32198745,0.717627,0.6711099,0.7116444,0.63400185,47.77424 32 | 0.0037569061,0.20222545,0.87646365,0.7994039,0.39707634,0.67517555,31.118715 33 | 0.22541435,0.21575151,0.22306475,0.43429253,0.5146177,0.26849377,48.728046 34 | 0.026961327,0.13195306,0.4792242,0.8174741,0.4752711,0.48911184,45.101387 35 | 0.25149173,0.108132005,0.51089513,0.49143383,0.33185083,0.1765034,28.896011 36 | 0.0019889502,0.3713056,0.7353831,0.694783,0.66971374,0.45324078,47.452248 37 | 0.0024309393,0.5345512,0.7858913,0.91215014,0.33388117,0.52185166,30.356146 38 | 0.03248619,0.34250474,0.10106478,0.21474813,0.37100264,0.19289763,33.17847 39 | 0.22475137,0.27445924,0.5219935,0.45021603,0.51532274,0.21871527,65.63509 40 | 0.0092817675,0.30552664,0.86067957,0.75655913,0.7311297,0.5945269,49.36544 41 | 0.019005526,0.34569347,0.85613215,0.7572305,0.5382169,0.75867313,26.33286 42 | 0.028729282,0.2291078,0.93254054,0.7572706,0.71005917,0.5577309,35.07983 43 | 0.26563537,0.26942897,0.5650416,0.50213695,0.41333362,0.32009757,30.977402 44 | 0.019889504,0.18089658,0.15815185,0.6456001,0.71371824,0.16952786,68.7067 45 | 0.41038674,0.23521036,0.65319586,0.55314136,0.47126192,0.6344953,39.549297 46 | 0.0030939225,0.31869045,0.7242711,0.6775234,0.6804979,0.50073946,54.32535 47 | 0.17635359,0.15698141,0.6737288,0.5092962,0.4475817,0.18464947,58.19134 48 | 0.8344751,0.20813307,0.1333319,-2.6073766e-07,0.040686265,0.39943722,27.101109 49 | 0.0019889502,0.29953936,0.5264563,0.5638273,0.7797166,0.18898681,51.78892 50 | 0.003314917,0.23500468,0.7486539,0.9224622,0.49392265,0.75746274,38.90947 51 | 0.03558011,0.35374644,0.8816092,0.8101871,0.5360119,0.7693585,39.111732 52 | 0.029834256,0.32356113,0.70075005,0.8664005,0.48714685,0.68113446,41.93296 53 | 0.0026519338,0.33893362,0.787917,0.9270389,0.41967708,0.77487606,30.714285 54 | 0.004640884,0.2713475,0.16981529,0.47771332,0.5487597,0.1389585,38.014004 55 | 0.31093922,0.12211534,0.53295285,0.4954879,0.4037745,0.23249881,30.490252 56 | 0.059889503,0.3736145,0.11431195,0.29595634,0.41722316,0.27826688,33.01549 57 | 0.063425414,0.2667522,0.85902756,0.7692392,0.8016137,0.33468235,48.08472 58 | 0.03314917,0.3717937,0.2858827,0.15020154,0.29403958,0.21220516,23.202515 59 | 0.005303867,0.2308108,0.0862774,0.55612826,0.5467725,0.21391967,26.893465 60 | 0.36928177,0.09641111,0.7075604,0.46846172,0.27696142,0.09011929,29.554775 61 | 0.06497238,0.19312048,0.83780175,0.79497695,0.8785772,0.34593356,39.380222 62 | 0.011491713,0.29943,0.86871874,0.75513434,0.76671505,0.5198747,44.524426 63 | 0.016574586,0.3201773,0.81956077,0.76385856,0.5451898,0.6300588,32.401684 64 | 0.014364641,0.30044088,0.95890224,0.80804706,0.6932025,0.5919622,42.469913 65 | 0.0019889502,0.3266357,0.7455478,0.71244216,0.679954,0.5288941,39.354343 66 | 0.04994475,0.41097084,0.12397446,0.2947881,0.4116159,0.2598141,31.191341 67 | 0.24243093,0.07436449,0.34024414,0.5424297,0.29950216,0.0644164,40.2274 68 | 0.21237569,0.3028637,0.6810884,0.47346565,0.3842382,0.2309501,59.83844 69 | 0.010165745,0.3514362,0.9762947,0.7596519,0.6044323,0.62027633,28.46469 70 | 0.2437569,0.383367,0.19930857,0.35845158,0.35618982,0.23546168,38.79972 71 | 0.0017679558,0.3530581,0.7303188,0.6808841,0.6398005,0.5015025,38.128242 72 | 0.019889504,0.2522434,0.8566552,0.781862,0.4984818,0.5942527,39.123596 73 | 0.20861878,0.19070935,0.98760444,0.6322658,0.20272164,0.037829738,53.63764 74 | 0.007292818,0.43294743,0.95153034,0.7869632,0.6060314,0.62770766,29.798592 75 | 0.011049723,0.17598186,0.501819,0.5678413,0.5695752,0.213139,25.741072 76 | 0.0048618787,0.40508962,0.96676916,0.78320384,0.5961628,0.65197676,37.094444 77 | 0.00640884,0.31708235,0.5245716,0.41527817,0.51029164,0.24659884,28.936619 78 | 0.008618785,0.23614255,0.035102524,0.4088504,0.51306045,0.25751346,32.523876 79 | 0.039558012,0.0697966,0.9386764,0.7863281,0.61304826,0.49196562,43.445835 80 | 0.017016575,0.20456436,0.09044967,0.59579635,0.7643809,0.23488274,68.208336 81 | 0.008176796,0.32821053,0.6813973,0.6554105,0.74747944,0.44595322,55.204483 82 | 0.26232046,0.107146025,0.5983069,0.8483646,0.1925711,0.57304305,31.867687 83 | 0.1719337,0.060669962,0.95771587,0.5021522,0.4570284,0.22001688,58.139366 84 | 0.009723756,0.37297857,0.5838368,0.60453296,0.7513571,0.25372458,56.597057 85 | 0.033812154,0.2512321,0.24304828,0.24155878,0.22830991,0.13686058,28.63649 86 | 0.0075138123,0.31509042,0.7168845,0.6947019,0.73220074,0.54357386,49.778713 87 | 0.3686188,0.22667034,0.08877153,0.6669376,0.17466511,0.57312363,27.45339 88 | 0.23403314,0.16184253,0.48393378,0.3910539,0.34024101,0.15679339,31.325905 89 | 0.15381216,0.2246528,0.21972781,0.45020458,0.531367,0.2648863,54.831932 90 | 0.05325967,0.30189633,0.837319,0.74996924,0.6854677,0.5115031,46.850704 91 | 0.01723757,0.20603998,0.6310991,0.6634891,0.7916352,0.2999028,58.128532 92 | 0.03403315,0.24723479,0.24018762,0.24765466,0.2281474,0.13731931,29.87815 93 | 0.051933702,0.22358933,0.80182976,0.717407,0.6832353,0.88001966,40.780113 94 | 0.0019889502,0.3522462,0.7268019,0.6907346,0.6872409,0.464977,46.04482 95 | 0.8075138,0.06963738,0.036927458,0.3461139,0.04823277,0.26496038,10.288012 96 | 0.020994475,0.24914855,0.97363746,0.7719619,0.7181885,0.6391606,41.61517 97 | 0.09723757,0.120910786,0.23284018,0.5867851,0.4755165,0.21149537,74.34078 98 | 0.43359116,0.29254928,0.60071844,0.3751199,0.2584444,0.19453457,29.16156 99 | 0.01723757,0.20676495,0.63107127,0.6638372,0.7921182,0.2969117,57.658707 100 | 0.045966852,0.20849036,0.64057505,0.56599975,0.7026082,0.23346014,56.483147 101 | 0.29569063,0.27328536,0.572445,0.7853153,0.22880022,0.87547964,18.640804 102 | 0.044640884,0.22123727,0.8887276,0.82198405,0.33279356,0.6424198,24.038124 103 | 0.0121546965,0.24882153,0.7721715,0.73946357,0.6989807,0.61800516,44.10504 104 | 0.0022099447,0.3612869,0.7271288,0.690377,0.68295115,0.45436844,43.560055 105 | 0.009502762,0.2601268,0.84787625,0.73652434,0.6416695,0.7800308,44.49294 106 | 0.011049723,0.34795797,0.7356019,0.9096401,0.4389331,0.7359373,26.576601 107 | 0.0044198898,0.2035797,0.005629674,0.5688093,0.8090169,0.25129184,46.71831 108 | 0.021436464,0.2024077,0.59198076,0.67707515,0.78570473,0.2394176,66.82163 109 | 0.07138122,0.20528862,0.8742364,0.80001235,0.8988606,0.3393627,36.481895 110 | 0.008176796,0.08699031,0.78227544,0.5286596,0.7384949,0.24763876,51.043663 111 | 0.80839777,0.0738076,0.03406071,0.35642883,0.029463083,0.26403695,11.043732 112 | 0.104309395,0.26546553,0.9130665,0.7119005,0.6180816,0.475646,31.05857 113 | 0.012596685,0.2859418,0.69376737,0.6831672,0.72480357,0.47706833,47.881943 114 | 0.19403315,0.35909998,0.7501788,0.6735637,0.64475924,0.4563952,24.834723 115 | 0.23425414,0.19438633,0.95525914,0.44099304,0.35089236,0.092587225,45.84322 116 | 0.03911602,0.3754238,0.06897833,0.32573196,0.41972998,0.27178526,48.26264 117 | 0.013480663,0.15466231,0.72886395,0.7411163,0.52722204,0.5687404,27.130919 118 | 0.028950278,0.14689739,0.46510053,0.81865,0.47424287,0.49270543,42.14366 119 | 0.12883978,0.089718856,0.024415454,0.57005477,0.48626792,0.37949872,49.42897 120 | 0.09082873,0.20940377,0.00015382374,0.6092193,0.5572145,0.32192805,67.22881 121 | 0.7946961,0.2040254,0.601307,0.34364387,0.032532886,0.37091053,8.361032 122 | 0.009502762,0.36862996,0.5923267,0.60909534,0.75300837,0.2552564,62.66092 123 | 0.012375691,0.34207287,0.85981727,0.7606399,0.5658911,0.7450125,34.24792 124 | 0.0019889502,0.53687894,0.7357631,0.7228496,0.6759238,0.43179172,39.276203 125 | 0.014585636,0.1518669,0.73089176,0.74272895,0.54065007,0.579125,28.95391 126 | 0.0048618787,0.20286365,0.109320164,0.55499053,0.53316486,0.22157899,26.362745 127 | 0.052596685,0.22065589,0.8859981,0.79835486,0.8841945,0.35846552,32.584507 128 | 0.1677348,0.19911687,0.035525482,0.48016426,0.18418361,0.091293775,61.292614 129 | 0.04044199,0.28273472,0.12512809,0.36791965,0.3552337,0.15686502,21.676966 130 | 0.009060773,0.3601462,0.72248036,0.91456294,0.4457336,0.7571128,34.497158 131 | 0.0121546965,0.26747674,0.6484121,0.6625583,0.7783284,0.3140333,55.75 132 | 0.05281768,0.29973865,0.16343206,0.2103536,0.33075655,0.20487224,22.020891 133 | 0.009944751,0.04595559,0.1801408,0.53931785,0.8059076,0.2429899,53.189075 134 | 0.005745856,0.12752293,0.14251518,0.5797527,0.8091933,0.2366783,57.220932 135 | 0.010828729,0.28926402,0.830715,0.89721656,0.4946028,0.7387586,35.945984 136 | 0.005745856,0.333449,0.8403429,0.73565364,0.73792964,0.6238692,48.22549 137 | 0.3085083,0.19440426,0.7908104,0.6775949,0.1999097,0.026821932,131.09464 138 | 0.06762431,0.16138174,0.37213138,0.798085,0.93449473,0.28787565,46.441505 139 | 0.016353592,0.19679391,0.6718458,0.60886836,0.684979,0.28250185,41.163406 140 | 0.12287293,0.30746698,0.49000597,0.45885155,0.10236769,0.1394217,18.033333 141 | 0.012375691,0.22064182,0.6558732,0.6701677,0.8028744,0.3770521,53.372906 142 | 0.017679559,0.13920787,0.5162516,0.56156516,0.5405634,0.25192928,31.774788 143 | 0.0024309393,0.3501403,0.73759276,0.69709086,0.6297296,0.4537434,37.25838 144 | 0.0075138123,0.39391708,0.96404004,0.7758701,0.609634,0.6345736,31.190678 145 | 0.20640883,0.2790647,0.5181823,0.45710728,0.5329172,0.22108011,67.9072 146 | 0.026077349,0.0682743,0.7920379,0.8846166,0.39818552,0.4723082,23.673183 147 | 0.069392264,0.21927555,0.89138067,0.7978599,0.9058306,0.3343671,41.16714 148 | 0.0013259669,0.2442253,0.5118135,0.4686,0.5376352,0.19329739,32.922005 149 | 0.07756906,0.32404506,0.84914154,0.772187,0.83938557,0.29396072,41.39944 150 | 0.01038674,0.23265687,0.7474689,0.919482,0.49481165,0.77971774,35.754875 151 | 0.0022099447,0.34616295,0.72991616,0.67821956,0.6413289,0.5054242,37.98736 152 | 0.19712706,0.16375841,0.27134106,0.4291179,0.4195375,0.32540664,50.173294 153 | 0.012596685,0.24582118,0.7746926,0.75574946,0.55681413,0.57511944,35.3078 154 | 0.08883978,0.17028742,0.72780645,0.71735835,0.6003739,1.0000001,22.065903 155 | 0.011491713,0.14807728,0.3592596,0.75862765,0.155391,0.0017853978,68.71764 156 | 0.23668508,0.32482865,0.27097765,0.3714492,0.38639954,0.21385475,39.944443 157 | 0.0154696135,0.24793562,0.9712532,0.77942824,0.70587486,0.65457684,42.71229 158 | 0.32773483,0.26136932,0.039020766,0.4575698,0.16154255,0.08276109,27.202778 159 | 0.015690608,0.29617023,0.95454144,0.807287,0.6754005,0.5707992,47.850704 160 | 0.107182324,0.20862865,0.1135592,0.5381639,0.18897301,0.07854469,63.06546 161 | 0.34099448,0.2448186,0.14036521,0.44356892,0.18568763,0.111145295,36.92837 162 | 0.042651936,0.31329805,0.9922845,0.75070167,0.59989494,0.60564643,27.253603 163 | 0.16154696,0.13966915,0.727755,0.52962184,0.60115254,0.24229568,56.08169 164 | 0.117127076,0.14750277,0.40725943,0.49479935,0.1645514,0.15080547,20.616991 165 | 0.2238674,0.14723408,0.9615435,0.4444606,0.35747823,0.10299031,42.9683 166 | 0.04994475,0.123832084,0.75617546,0.7926414,0.3874991,0.5600137,26.27528 167 | 0.24441989,0.3865947,0.2051002,0.35920307,0.36000943,0.23217861,36.205383 168 | 0.003314917,0.21461233,0.7554867,0.905833,0.49523157,0.7200073,38.888268 169 | 0.015690608,0.20863628,0.67487246,0.60671496,0.68616915,0.27377784,47.184357 170 | 0.004640884,0.22886005,0.13823983,0.45979187,0.5330237,0.15519932,31.971989 171 | 0.0026519338,0.44263086,0.7510644,0.71037745,0.6586315,0.42734334,41.431564 172 | 0.013701658,0.25352505,0.8990775,0.8241203,0.55952245,0.4993243,52.133705 173 | 0.008397791,0.19299203,0.32089177,0.48495266,0.599457,0.16744208,27.50419 174 | 0.0024309393,0.5744522,0.71760154,0.95260024,0.3985062,0.76110613,25.928371 175 | 0.018342542,0.39789566,0.15451486,0.18463777,0.30359918,0.17639682,31.34682 176 | 0.0240884,0.198229,0.74960905,0.7778356,0.624898,0.9232415,50.814762 177 | 0.067182325,0.42167366,0.2911286,0.2622182,0.22442065,0.18025288,9.045961 178 | 0.37303868,0.41213793,0.001698079,0.69158053,0.22562633,0.5560595,17.84819 179 | 0.006187845,0.16829395,0.7782278,0.9200733,0.50502783,0.77493656,38.293056 180 | 0.25082874,0.11096438,0.511968,0.5667169,0.3116882,0.08330558,31.527523 181 | 0.007955802,0.31164595,0.83681816,0.7130468,0.733716,0.59287626,42.164326 182 | 0.013701658,0.15065983,0.09342649,0.6364162,0.7420299,0.17320052,72.55014 183 | 0.015027625,0.15536955,0.044418823,0.6584642,0.7444733,0.16904087,60.56695 184 | 0.42563537,0.29945695,0.8485121,0.5415666,0.41986388,0.462143,22.508404 185 | 0.0024309393,0.16408212,0.7224416,0.88892055,0.37516153,0.60582286,32.28 186 | 0.25016576,0.060658652,0.66451967,0.84116435,0.2209663,0.5248163,32.77222 187 | 0.06585635,0.21851414,0.7932488,0.7073705,0.6795758,0.8547577,32.74359 188 | 0.0026519338,0.35516104,0.76301587,0.7106712,0.62564796,0.53113705,43.098885 189 | 0.0019889502,0.3012076,0.52232236,0.57138705,0.7976485,0.18623981,50.36938 190 | 0.02364641,0.12177374,0.944593,0.87112594,0.5143791,0.87831557,37.981792 191 | 0.034696132,0.24944037,0.23950364,0.31307575,0.27136278,0.14039916,18.97067 192 | 0.020331493,0.26481885,0.5141621,0.38704464,0.4846877,0.27374908,40.690884 193 | 0.23182319,0.31484652,0.25794315,0.3840892,0.39885148,0.20837513,36.502834 194 | 0.23513812,0.34034392,0.26227516,0.3755395,0.38293317,0.21670161,37.622158 195 | 0.006187845,0.3068099,0.69036716,0.64351344,0.7071716,0.4326356,55.336647 196 | 0.34497237,0.30589396,0.72267205,0.4702718,0.2523754,0.16970234,54.81601 197 | 0.0066298344,0.3117794,0.8366021,0.71401095,0.7513681,0.5993834,49.765713 198 | 0.20464088,0.41613382,0.9802105,0.2487142,0.112243734,0.16317587,12.435393 199 | 0.003977901,0.20163217,0.875612,0.8857782,0.512883,0.8117498,33.741478 200 | 0.020994475,0.15778509,0.1539405,0.652704,0.73894036,0.2094708,56.335655 201 | 0.37060773,0.22589569,0.08967332,0.6560123,0.1748818,0.57057613,30.391062 202 | 0.003977901,0.45848653,0.89418787,0.8663442,0.33222663,0.52888197,24.498611 203 | 0.08088398,0.07716011,0.16457799,0.42161915,0.5484035,0.21374397,23.534721 204 | 0.011491713,0.27652606,0.9378699,0.8030813,0.5565191,0.559062,37.263306 205 | 0.011491713,0.3135799,0.8614706,0.7554891,0.7386829,0.604434,43.77107 206 | 0.005745856,0.13037749,0.13268165,0.5799501,0.80483174,0.23567232,57.327778 207 | 0.0019889502,0.88289684,0.73266953,0.99999976,0.3438297,0.64889896,16.45702 208 | 0.0050828727,0.19584878,0.875182,0.800925,0.37301564,0.66843796,27.23743 209 | 0.008397791,0.19717813,0.5356296,0.52198195,0.72490335,0.17296432,51.32687 210 | 0.0059668506,0.3823386,0.8997256,0.7235439,0.6656285,0.6160205,50.58889 211 | 0.017900553,0.26576763,0.7303521,0.7531564,0.701004,0.6184674,52.290833 212 | 0.07779006,0.29591614,0.6599215,0.6423881,0.5381601,0.29223257,60.51585 213 | 0.04773481,0.3477405,0.07680572,0.24174474,0.39929616,0.31435055,27.61111 214 | -------------------------------------------------------------------------------- /demo/demo_result/gnnwr_datasets/train_dataset/distances.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo/demo_result/gnnwr_datasets/train_dataset/distances.npy -------------------------------------------------------------------------------- /demo/demo_result/gnnwr_datasets/val_dataset/distances.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo/demo_result/gnnwr_datasets/val_dataset/distances.npy -------------------------------------------------------------------------------- /demo/demo_result/gnnwr_datasets/val_dataset/scaledDataframe.csv: -------------------------------------------------------------------------------- 1 | dem,w10,d10,t2m,aod_sat,tp,PM2_5 2 | 0.07138122,0.2679335,0.85663384,0.7708061,0.79523104,0.3380162,42.04635 3 | 0.031381216,0.2254657,0.6882547,0.5810478,0.73961776,0.23825799,49.33148 4 | 0.0028729283,0.31707606,0.52900237,0.56991935,0.7922231,0.1843699,47.900837 5 | 0.01878453,0.21269684,0.60906476,0.69307494,0.7811328,0.4146027,62.292957 6 | 0.013480663,0.216409,0.6307918,0.5579765,0.607568,0.20661129,32.282486 7 | 0.23469612,0.2023108,0.95054215,0.4320819,0.3623628,0.093510404,45.810055 8 | 0.098342545,0.12989755,0.23410548,0.5849416,0.485667,0.21219996,81.15417 9 | 0.34254146,0.12336149,0.7377138,0.49780533,0.26699892,0.07907084,29.56704 10 | 0.019668508,0.33216563,0.70212686,0.8978889,0.4797082,0.6896146,33.823032 11 | 0.006187845,0.3422426,0.5900477,0.6104162,0.793568,0.21317294,57.425 12 | 0.24662983,0.20360902,0.33013687,0.5159862,0.3297993,0.06657231,34.72549 13 | 0.0077348067,0.25518173,0.7111604,0.91919875,0.47799695,0.76139265,33.541428 14 | 0.12640883,0.3410623,0.21624012,0.35578987,0.37823477,0.15102555,25.29609 15 | 0.023425415,0.18987153,0.5790332,0.6726978,0.7872956,0.24504986,65.23729 16 | 0.7432044,0.06477421,0.16427492,0.25895092,0.028043643,0.32110104,19.725328 17 | 0.16508287,0.39312145,0.09268356,0.47182056,0.19940789,0.24744025,34.776836 18 | 0.019889504,0.3690024,0.58201075,0.59872985,0.7416625,0.25750828,50.280884 19 | 0.006850829,0.30730048,0.69015986,0.6436546,0.71234196,0.4304757,55.984592 20 | 0.04331492,0.30532932,0.91345656,0.6264694,0.6934867,0.22048308,66.331924 21 | 0.0028729283,0.44781378,0.737878,0.7067182,0.6606948,0.43576327,43.77966 22 | 0.36088398,0.39965236,0.0023548112,0.6869056,0.23088287,0.5665783,29.842407 23 | 0.010828729,0.2537974,0.5079938,0.4028413,0.51258826,0.26611876,36.12639 24 | 0.097900555,0.044926863,0.08312661,0.6828468,0.60941076,0.7383143,41.53792 25 | 0.009944751,0.12838468,0.9261365,0.76358676,0.77548134,0.5990109,32.593575 26 | 0.07005525,0.15940313,0.7705165,0.82654834,0.5010384,0.80440205,28.128834 27 | 0.20419888,0.14749081,0.016621599,0.42687675,0.18013409,0.11337456,53.626087 28 | 0.006187845,0.32864952,0.6956208,0.6719043,0.72299033,0.544386,63.05042 29 | 0.005745856,0.18785506,0.7608575,0.9023168,0.42644694,0.73853487,28.84734 30 | 0.007955802,0.20710362,0.7589766,0.90209174,0.4931504,0.8038134,28.381285 31 | 0.46983427,0.46112078,0.50058925,0.67595553,0.2219309,0.7180962,26.839031 32 | 0.011270718,0.33054897,0.71171814,0.6799495,0.73024064,0.52669585,56.07521 33 | 0.13215469,0.09098705,0.056036867,0.58300376,0.4838314,0.36277536,43.649 34 | 0.039337017,0.38537115,0.12681748,0.22890161,0.35470024,0.1737455,34.970913 35 | 0.0048618787,0.12717009,0.96721333,0.40007278,0.5143515,0.2590364,22.355742 36 | 0.042651936,0.30034724,0.56212646,0.39545128,0.4918095,0.25793603,27.613846 37 | 0.0026519338,0.32797477,0.7340514,0.697541,0.58481413,0.481963,40.80791 38 | 0.0077348067,0.23604386,0.8487255,0.72261596,0.6234733,0.63240683,39.349163 39 | 0.34386742,0.12034159,0.18088715,0.4975612,0.21497591,0.07154164,24.386871 40 | 0.00640884,0.26367903,0.56074846,0.5962131,0.6706995,0.18635803,55.09861 41 | 0.00640884,0.2894672,0.7357769,0.66652083,0.71918064,0.6072824,52.098885 42 | 0.009723756,0.264416,0.67211485,0.6635959,0.7641786,0.41396278,53.261234 43 | 0.6066298,0.115344204,0.56670606,0.16882013,0.15671344,0.6211873,15.21648 44 | 0.073149174,0.30873948,0.15742601,0.56454444,0.7030372,0.25672805,52.410446 45 | 0.06320442,0.15515688,0.75633985,0.8178928,0.50281715,0.8623764,32.439056 46 | 0.0050828727,0.2197586,0.76049536,0.8910644,0.3514212,0.6597338,26.142254 47 | 0.11403315,-9.9928454e-11,0.4457289,0.6510322,0.5169387,0.4231225,47.886112 48 | 0.0055248616,0.41791862,0.92876625,0.82663894,0.36661854,0.5501283,28.973389 49 | 0.33745858,0.112309285,0.18556336,0.5075147,0.20680071,0.06859414,33.28028 50 | 0.019889504,0.34348837,0.6982348,0.8971946,0.48303556,0.6791276,33.867317 51 | 0.00640884,0.33273718,0.73184353,0.6846111,0.6467839,0.4902719,43.631287 52 | 0.07513812,0.23711592,0.99901545,0.8007047,0.93854594,0.25284824,54.585434 53 | 0.020773482,0.31953222,0.6965206,0.89733005,0.47626537,0.67811537,36.841953 54 | 0.0022099447,0.19033262,0.5387023,0.5745504,0.5917029,0.21787511,41.015625 55 | 0.019889504,0.26211762,0.5102667,0.3799636,0.48382688,0.27702174,34.993015 56 | 0.0121546965,0.25114244,0.010995409,0.4008138,0.49577838,0.2658469,31.036516 57 | 0.011049723,0.23576409,0.9705063,0.7833421,0.6940426,0.6742058,41.826706 58 | 0.047955804,0.39936283,0.12289669,0.2893121,0.42250723,0.27019018,34.31728 59 | 0.03403315,0.3832251,0.12872672,0.22989629,0.3501561,0.1700674,37.67695 60 | 0.034696132,0.11448371,0.7309995,0.82286906,0.38001353,0.57743174,22.719275 61 | 0.010607734,0.2894748,0.9387572,0.804878,0.55862033,0.5573587,44.833332 62 | 0.011712708,0.07397623,0.2097557,0.5388,0.8084515,0.23871575,54.89859 63 | 0.35403317,0.110029094,0.7210368,0.48319313,0.27668303,0.084690474,33.15181 64 | 0.019005526,0.28930143,0.7427294,0.9001577,0.42713276,0.7400028,24.588484 65 | 0.0028729283,0.1362263,0.35372496,0.49066898,0.61682916,0.17457673,36.638268 66 | 0.02519337,0.1962972,0.86713064,0.8326719,0.50761604,0.66832465,44.24504 67 | 0.031823203,0.17533831,0.7856419,0.7204168,0.55086714,0.80412763,26.528011 68 | 0.2556906,0.06125618,0.6485774,0.8272083,0.22275172,0.52469087,34.35014 69 | 0.017679559,0.16462788,0.118144736,0.6552522,0.72969085,0.16624752,68.93838 70 | 0.2479558,0.38227737,0.20548809,0.35157844,0.35264575,0.23683813,35.798798 71 | 0.0022099447,0.29269558,0.6266399,0.587096,0.6936432,0.17319332,50.715878 72 | 0.010165745,0.17286249,0.90386945,0.87807155,0.4189847,0.62860876,26.02241 73 | 0.028729282,0.23983568,0.8710661,0.78242373,0.49322498,0.61698735,36.319088 74 | 0.009060773,0.2628548,0.7042283,0.7501962,0.682004,0.62542087,54.80532 75 | 0.022541437,0.056269985,0.04544065,0.66095424,0.78012663,0.30692643,60.342255 76 | 0.029171271,0.3362548,0.6926786,0.898195,0.47409028,0.67877465,34.706554 77 | 0.079558015,0.35709912,0.69209474,0.6276758,0.5538763,0.226898,73.66899 78 | 0.0015469614,0.34151864,0.5393746,0.56686664,0.77508706,0.18852633,57.08866 79 | 0.022762433,0.20397407,0.7482319,0.7779424,0.62433296,0.9151344,49.81983 80 | 0.34209946,0.15236633,0.16454436,0.67561316,0.18903582,0.86809266,26.17847 81 | 0.0059668506,0.24559519,0.7482376,0.70163035,0.6604642,0.5514042,38.026684 82 | 0.003977901,0.49862307,0.73352176,0.9500768,0.42121735,0.64075935,28.538136 83 | 0.027403316,0.25848937,0.77511144,0.89841247,0.46069467,0.66359425,28.271307 84 | 0.03248619,0.21487156,0.681991,0.5774734,0.7389101,0.24393389,50.27793 85 | 0.0026519338,0.3450529,0.76055765,0.7085054,0.62610364,0.5159845,41.25 86 | 0.23867403,0.124173455,0.5200983,0.49371216,0.347637,0.17662136,30.51983 87 | 0.073370166,0.32554355,0.91809195,0.7952039,0.9510327,0.2611534,34.325844 88 | 0.0050828727,0.32809326,0.6950427,0.67265296,0.72731036,0.54306555,49.433334 89 | 0.037348066,0.29566,0.99243355,0.7613294,0.7352256,0.5435741,41.67039 90 | 0.67447513,0.1184702,0.5571427,0.14396928,0.16135521,0.6349823,18.258928 91 | 0.085303865,0.23799798,0.8332079,0.78496146,0.8726242,0.22541521,37.295013 92 | 0.051491715,0.41436228,0.12493072,0.29561207,0.41655108,0.26224363,32.667606 93 | 0.20950276,0.29201406,0.5181476,0.45689556,0.52843326,0.22221494,67.22486 94 | 0.13613258,0.100137256,0.83583236,0.65636706,0.56340265,0.33452323,21.46229 95 | 0.003977901,0.48982948,0.8961417,0.868202,0.3528018,0.5243989,26.760504 96 | 0.051933702,0.2177624,0.857477,0.8030822,0.86611354,0.3487197,29.910864 97 | 0.24640884,0.27516428,0.93978894,0.5852258,0.20063667,0.060163066,69.5 98 | 0.091491714,0.25221598,0.4856858,0.6219623,0.55670553,0.2506901,67.50702 99 | 0.026519338,0.26173818,0.0017443642,0.39448234,0.47960156,0.27293321,30.004238 100 | 0.014143647,0.34099612,0.86380816,0.7617166,0.5510016,0.7381825,31.278711 101 | 0.047071826,0.38470212,0.87013566,0.81149936,0.52640444,0.6706164,33.866947 102 | 0.17016573,0.26758778,0.9620872,0.35912487,0.4377907,0.19626693,30.672672 103 | 0.25436464,0.06125622,0.6148574,0.46197674,0.43490887,0.35021138,20.0625 104 | 0.011270718,0.5094497,0.74852616,0.7207296,0.6550343,0.4319278,40.37883 105 | 0.011049723,0.31904614,0.5347098,0.41820213,0.5079695,0.24499166,33.318943 106 | 0.12530386,0.12229026,0.9994843,0.61579204,0.502418,0.45630947,41.890625 107 | 0.01723757,0.29914445,0.95634925,0.8077667,0.6758797,0.5781338,42.722992 108 | 0.0077348067,0.20260853,0.54075205,0.52502036,0.7302204,0.17355071,45.890278 109 | 0.0024309393,0.45644706,0.7508078,0.71276927,0.64505124,0.42836964,39.794693 110 | 0.022541437,0.33622172,0.51367253,0.5735147,0.70060635,0.25619027,50.945072 111 | 0.06762431,0.28269252,0.874792,0.7846582,0.8074929,0.3918664,30.788889 112 | 0.65679556,0.12486956,0.73902196,0.19325231,0.089335255,0.39278784,3.856338 113 | 0.0017679558,0.36846066,0.53922784,0.57699084,0.7511444,0.18118325,48.95238 114 | 0.0048618787,0.3462533,0.7354455,0.67331386,0.7169344,0.5765075,39.82558 115 | 0.026961327,0.21001314,0.9606031,0.7869861,0.6784058,0.7185319,33.701427 116 | 0.007955802,0.16580519,0.73954475,0.91522956,0.5056572,0.7412056,39.67787 117 | 0.240221,0.37869552,0.6554775,0.64869094,0.53349257,0.50278383,32.42655 118 | 0.0026519338,0.17299204,0.7714856,0.9201381,0.510602,0.764094,38.815342 119 | 0.0075138123,0.33532178,0.83970964,0.73874354,0.74460375,0.6232194,48.60393 120 | 0.0075138123,0.3241341,0.6900529,0.6606748,0.7378301,0.51807815,55.429165 121 | 0.01281768,0.4223073,0.742606,0.9161775,0.41220054,0.7026039,22.577465 122 | 0.013480663,0.25855145,0.5046039,0.3980815,0.49847317,0.27048337,30.669971 123 | 0.12132597,0.056625154,0.5743046,0.5713041,0.49239057,0.3609508,56.484722 124 | 0.24419889,0.21484298,0.38284257,0.50747657,0.30679446,0.07583759,45.588825 125 | 0.15116021,0.22843793,0.21173409,0.45553562,0.54403275,0.25803813,58.70972 126 | 0.02961326,0.06644538,0.96960694,0.74850154,0.47318637,0.63942325,28.007246 127 | 0.06961326,0.28578314,0.875398,0.78443503,0.81425047,0.3907439,42.27514 128 | 0.006850829,0.277439,0.6892119,0.63221335,0.7148735,0.38172278,62.164326 129 | 0.33745858,0.23231164,0.13962641,0.45645878,0.21060343,0.10455266,36.281944 130 | 0.0022099447,0.35496506,0.7288813,0.6885841,0.61224246,0.4853787,35.280415 131 | 0.026519338,0.17597263,0.75231314,0.77517486,0.65131754,0.78506553,43.545834 132 | 0.079116024,0.12412078,0.7241494,0.7804401,0.38094324,0.6094636,20.881945 133 | 0.01723757,0.23507391,0.15755418,0.61407447,0.7222761,0.19110207,74.2493 134 | 0.23823203,0.3800827,0.6553258,0.64730525,0.530359,0.50358284,30.995714 135 | 0.08044199,0.2950644,0.66418,0.64279914,0.5408222,0.2871398,72.50143 136 | 0.0050828727,0.3197213,0.7298333,0.697891,0.6601067,0.52453125,42.490196 137 | 0.063867405,0.27226186,0.8605791,0.7711551,0.81151855,0.33305532,51.33241 138 | 0.035801105,0.36338577,0.8811514,0.8142793,0.53386515,0.72721034,37.93017 139 | 0.032707185,0.31960338,0.7056393,0.865854,0.49193323,0.6633638,39.07283 140 | 0.017679559,0.13819046,0.11340815,0.59038806,0.7454049,0.24028826,72.54902 141 | 0.003314917,0.3286214,0.73243374,0.69904876,0.572242,0.4855212,43.175636 142 | 0.0026519338,0.35567647,0.7296882,0.6850469,0.6603864,0.48757645,44.142654 143 | 0.0066298344,0.11811211,0.95480186,0.39915726,0.51084447,0.259196,24.141644 144 | 0.24508287,0.15509835,0.0022717393,0.53465533,0.31086668,0.054561518,43.653408 145 | 0.0035359114,0.32493636,0.70853543,0.6477201,0.6941828,0.41165742,45.624653 146 | 0.066961326,0.2246578,0.90760386,0.79243255,0.90125555,0.34987235,37.210308 147 | 0.055911604,0.28157017,0.06396376,0.24626134,0.4027616,0.3453075,29.62781 148 | 0.085524864,0.59928536,0.3714965,0.5666015,0.15527984,0.055872314,24.26826 149 | 0.007292818,0.2640519,0.7801824,0.7457788,0.70339376,0.613418,45.08989 150 | 0.04839779,0.40833098,0.12358637,0.2936513,0.40342778,0.2621316,30.474648 151 | 0.20508286,0.28260073,0.51635975,0.45999882,0.52119064,0.22223848,72.245094 152 | 0.017458564,0.15945539,0.8524795,0.66328406,0.7395412,0.20021395,53.45658 153 | 0.014143647,0.2968914,0.69523907,0.6301105,0.70954466,0.3433122,49.326332 154 | 0.05281768,0.29729414,0.16013014,0.21107553,0.3353439,0.2043788,25.844984 155 | 0.03005525,0.26054224,0.76729137,0.89753795,0.45971996,0.6599776,30.147308 156 | 0.0017679558,0.3449026,0.7417573,0.69486403,0.6421995,0.43949887,37.626564 157 | 0.3367956,0.107751295,0.70562196,0.5563648,0.59434116,0.5083997,31.519499 158 | 0.28508288,0.39293674,0.55394506,0.7322128,0.28233603,0.70478433,27.5 159 | 0.0019889502,0.21392184,0.0681128,0.44039127,0.5461635,0.21264432,32.53771 160 | 0.011933702,0.3636303,0.6171291,0.58074737,0.6133946,0.17754059,28.977064 161 | 0.02364641,0.19885723,0.75194514,0.77922225,0.626953,0.9179495,50.741665 162 | 0.07160221,0.16620256,0.7439433,0.6405351,0.69361675,0.4172005,45.014164 163 | 0.20508286,0.15266606,0.1362419,0.8230226,0.21223445,0.9016727,38.136105 164 | 0.024972377,0.13325706,0.48317292,0.8178165,0.47411394,0.4863735,44.84497 165 | 0.01480663,0.17925541,0.64079785,0.67238307,0.810898,0.36970207,55.548023 166 | 0.8313812,0.16034743,0.07886831,0.022179343,0.030782968,0.32170403,17.880953 167 | 0.042651936,0.12611534,0.7591895,0.79343486,0.37530693,0.5585666,24.4162 168 | 0.012596685,0.26028326,0.5139895,0.3985946,0.4950229,0.2694234,38.461113 169 | 0.42121547,0.3969316,0.0052279,0.6649873,0.23474155,0.7713109,21.875347 170 | 0.13303867,0.09823606,0.05702189,0.5681665,0.48636997,0.37633213,50.70173 171 | 0.28618786,0.09721782,0.4407631,0.6799638,0.2077596,0.04374405,63.637005 172 | 0.04928177,0.44708818,0.8910345,0.86479354,0.34127665,0.54149747,25.4 173 | 0.003314917,0.18315391,0.5291369,0.56926036,0.61129093,0.21337816,38.38483 174 | 0.0037569061,0.17303167,0.71658164,0.91962314,0.48213613,0.82428724,35.297222 175 | 0.052154697,0.21358137,0.869447,0.7921035,0.8760086,0.36520264,40.681564 176 | 0.043535914,0.32038692,0.0673373,0.23700498,0.40231985,0.318988,31.672752 177 | 0.0030939225,0.26481074,0.7805036,0.7364948,0.5954125,0.6209628,42.86938 178 | 0.12906076,0.23964843,0.13886201,0.53411555,0.20377915,0.06266917,73.186966 179 | 0.5670718,0.042418126,0.2075756,0.25749752,0.11986209,0.42423674,29.077995 180 | 0.0121546965,0.35953903,0.74678296,0.68259215,0.69824225,0.53233063,57.34136 181 | -------------------------------------------------------------------------------- /demo/demo_utils.py: -------------------------------------------------------------------------------- 1 | import folium 2 | import json 3 | from folium.plugins import HeatMap, MarkerCluster 4 | def marker_map(markers:list,center:list,zoom=4,border=None): 5 | tiles= 'https://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=en&size=1&scl=1&style=7' 6 | map = folium.Map(location=center,zoom_start=zoom,tiles = tiles,attr="高德") 7 | if border != None: 8 | with open(border,encoding='utf-8') as f: 9 | t = f.readline() 10 | geojson = json.loads(t) 11 | folium.GeoJson(geojson).add_to(map) 12 | for item in markers: 13 | if not 'location' in item: raise ValueError('location of markers is neccessary') 14 | if not 'color' in item: item['color'] = 'blue' 15 | if not 'desc' in item: item['desc'] = [str(item['location'][i][1])+' '+str(item['location'][i][0]) for i in range(len(item['location']))] 16 | else : item['desc'] = [item['desc'] for i in range(len(item['location']))] 17 | mc = MarkerCluster(locations=item['location'],icons=[folium.Icon(color=item['color'],icon='location') for i in range(len(item['location']))],popups=item['desc']) 18 | mc.add_to(map) 19 | return map 20 | 21 | def Heatmap(data,center,zoom=4): 22 | tiles= 'https://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=en&size=1&scl=1&style=7' 23 | map = folium.Map(location=center,zoom_start=zoom,tiles = tiles,attr="高德") 24 | map.add_child(HeatMap(data)) 25 | return map 26 | -------------------------------------------------------------------------------- /demo_result/gnnwr_datasets/test_dataset/distances.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo_result/gnnwr_datasets/test_dataset/distances.npy -------------------------------------------------------------------------------- /demo_result/gnnwr_datasets/train_dataset/distances.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo_result/gnnwr_datasets/train_dataset/distances.npy -------------------------------------------------------------------------------- /demo_result/gnnwr_datasets/val_dataset/distances.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo_result/gnnwr_datasets/val_dataset/distances.npy -------------------------------------------------------------------------------- /demo_result/gnnwr_models/GNNWR_PM25.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo_result/gnnwr_models/GNNWR_PM25.pkl -------------------------------------------------------------------------------- /demo_result/gtnnwr_models/GTNNWR_DSi.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/demo_result/gtnnwr_models/GTNNWR_DSi.pkl -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /doc/build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/doctrees/environment.pickle -------------------------------------------------------------------------------- /doc/build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/doctrees/index.doctree -------------------------------------------------------------------------------- /doc/build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: bd1b3cf4d58d87feb29fdb0350936018 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /doc/build/html/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. GNNWR documentation master file, created by 2 | sphinx-quickstart on Sat Sep 16 22:25:09 2023. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to GNNWR's documentation! 7 | ================================= 8 | 9 | .. toctree:: 10 | :maxdepth: 3 11 | :caption: Contents: 12 | :glob: 13 | 14 | gnnwr/* 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | -------------------------------------------------------------------------------- /doc/build/html/_static/_sphinx_javascript_frameworks_compat.js: -------------------------------------------------------------------------------- 1 | /* Compatability shim for jQuery and underscores.js. 2 | * 3 | * Copyright Sphinx contributors 4 | * Released under the two clause BSD licence 5 | */ 6 | 7 | /** 8 | * small helper function to urldecode strings 9 | * 10 | * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL 11 | */ 12 | jQuery.urldecode = function(x) { 13 | if (!x) { 14 | return x 15 | } 16 | return decodeURIComponent(x.replace(/\+/g, ' ')); 17 | }; 18 | 19 | /** 20 | * small helper function to urlencode strings 21 | */ 22 | jQuery.urlencode = encodeURIComponent; 23 | 24 | /** 25 | * This function returns the parsed url parameters of the 26 | * current request. Multiple values per key are supported, 27 | * it will always return arrays of strings for the value parts. 28 | */ 29 | jQuery.getQueryParameters = function(s) { 30 | if (typeof s === 'undefined') 31 | s = document.location.search; 32 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 33 | var result = {}; 34 | for (var i = 0; i < parts.length; i++) { 35 | var tmp = parts[i].split('=', 2); 36 | var key = jQuery.urldecode(tmp[0]); 37 | var value = jQuery.urldecode(tmp[1]); 38 | if (key in result) 39 | result[key].push(value); 40 | else 41 | result[key] = [value]; 42 | } 43 | return result; 44 | }; 45 | 46 | /** 47 | * highlight a given string on a jquery object by wrapping it in 48 | * span elements with the given class name. 49 | */ 50 | jQuery.fn.highlightText = function(text, className) { 51 | function highlight(node, addItems) { 52 | if (node.nodeType === 3) { 53 | var val = node.nodeValue; 54 | var pos = val.toLowerCase().indexOf(text); 55 | if (pos >= 0 && 56 | !jQuery(node.parentNode).hasClass(className) && 57 | !jQuery(node.parentNode).hasClass("nohighlight")) { 58 | var span; 59 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 60 | if (isInSVG) { 61 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 62 | } else { 63 | span = document.createElement("span"); 64 | span.className = className; 65 | } 66 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 67 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 68 | document.createTextNode(val.substr(pos + text.length)), 69 | node.nextSibling)); 70 | node.nodeValue = val.substr(0, pos); 71 | if (isInSVG) { 72 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 73 | var bbox = node.parentElement.getBBox(); 74 | rect.x.baseVal.value = bbox.x; 75 | rect.y.baseVal.value = bbox.y; 76 | rect.width.baseVal.value = bbox.width; 77 | rect.height.baseVal.value = bbox.height; 78 | rect.setAttribute('class', className); 79 | addItems.push({ 80 | "parent": node.parentNode, 81 | "target": rect}); 82 | } 83 | } 84 | } 85 | else if (!jQuery(node).is("button, select, textarea")) { 86 | jQuery.each(node.childNodes, function() { 87 | highlight(this, addItems); 88 | }); 89 | } 90 | } 91 | var addItems = []; 92 | var result = this.each(function() { 93 | highlight(this, addItems); 94 | }); 95 | for (var i = 0; i < addItems.length; ++i) { 96 | jQuery(addItems[i].parent).before(addItems[i].target); 97 | } 98 | return result; 99 | }; 100 | 101 | /* 102 | * backward compatibility for jQuery.browser 103 | * This will be supported until firefox bug is fixed. 104 | */ 105 | if (!jQuery.browser) { 106 | jQuery.uaMatch = function(ua) { 107 | ua = ua.toLowerCase(); 108 | 109 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 110 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 111 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 112 | /(msie) ([\w.]+)/.exec(ua) || 113 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 114 | []; 115 | 116 | return { 117 | browser: match[ 1 ] || "", 118 | version: match[ 2 ] || "0" 119 | }; 120 | }; 121 | jQuery.browser = {}; 122 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 123 | } 124 | -------------------------------------------------------------------------------- /doc/build/html/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | div.section::after { 19 | display: block; 20 | content: ''; 21 | clear: left; 22 | } 23 | 24 | /* -- relbar ---------------------------------------------------------------- */ 25 | 26 | div.related { 27 | width: 100%; 28 | font-size: 90%; 29 | } 30 | 31 | div.related h3 { 32 | display: none; 33 | } 34 | 35 | div.related ul { 36 | margin: 0; 37 | padding: 0 0 0 10px; 38 | list-style: none; 39 | } 40 | 41 | div.related li { 42 | display: inline; 43 | } 44 | 45 | div.related li.right { 46 | float: right; 47 | margin-right: 5px; 48 | } 49 | 50 | /* -- sidebar --------------------------------------------------------------- */ 51 | 52 | div.sphinxsidebarwrapper { 53 | padding: 10px 5px 0 10px; 54 | } 55 | 56 | div.sphinxsidebar { 57 | float: left; 58 | width: 230px; 59 | margin-left: -100%; 60 | font-size: 90%; 61 | word-wrap: break-word; 62 | overflow-wrap : break-word; 63 | } 64 | 65 | div.sphinxsidebar ul { 66 | list-style: none; 67 | } 68 | 69 | div.sphinxsidebar ul ul, 70 | div.sphinxsidebar ul.want-points { 71 | margin-left: 20px; 72 | list-style: square; 73 | } 74 | 75 | div.sphinxsidebar ul ul { 76 | margin-top: 0; 77 | margin-bottom: 0; 78 | } 79 | 80 | div.sphinxsidebar form { 81 | margin-top: 10px; 82 | } 83 | 84 | div.sphinxsidebar input { 85 | border: 1px solid #98dbcc; 86 | font-family: sans-serif; 87 | font-size: 1em; 88 | } 89 | 90 | div.sphinxsidebar #searchbox form.search { 91 | overflow: hidden; 92 | } 93 | 94 | div.sphinxsidebar #searchbox input[type="text"] { 95 | float: left; 96 | width: 80%; 97 | padding: 0.25em; 98 | box-sizing: border-box; 99 | } 100 | 101 | div.sphinxsidebar #searchbox input[type="submit"] { 102 | float: left; 103 | width: 20%; 104 | border-left: none; 105 | padding: 0.25em; 106 | box-sizing: border-box; 107 | } 108 | 109 | 110 | img { 111 | border: 0; 112 | max-width: 100%; 113 | } 114 | 115 | /* -- search page ----------------------------------------------------------- */ 116 | 117 | ul.search { 118 | margin: 10px 0 0 20px; 119 | padding: 0; 120 | } 121 | 122 | ul.search li { 123 | padding: 5px 0 5px 20px; 124 | background-image: url(file.png); 125 | background-repeat: no-repeat; 126 | background-position: 0 7px; 127 | } 128 | 129 | ul.search li a { 130 | font-weight: bold; 131 | } 132 | 133 | ul.search li p.context { 134 | color: #888; 135 | margin: 2px 0 0 30px; 136 | text-align: left; 137 | } 138 | 139 | ul.keywordmatches li.goodmatch a { 140 | font-weight: bold; 141 | } 142 | 143 | /* -- index page ------------------------------------------------------------ */ 144 | 145 | table.contentstable { 146 | width: 90%; 147 | margin-left: auto; 148 | margin-right: auto; 149 | } 150 | 151 | table.contentstable p.biglink { 152 | line-height: 150%; 153 | } 154 | 155 | a.biglink { 156 | font-size: 1.3em; 157 | } 158 | 159 | span.linkdescr { 160 | font-style: italic; 161 | padding-top: 5px; 162 | font-size: 90%; 163 | } 164 | 165 | /* -- general index --------------------------------------------------------- */ 166 | 167 | table.indextable { 168 | width: 100%; 169 | } 170 | 171 | table.indextable td { 172 | text-align: left; 173 | vertical-align: top; 174 | } 175 | 176 | table.indextable ul { 177 | margin-top: 0; 178 | margin-bottom: 0; 179 | list-style-type: none; 180 | } 181 | 182 | table.indextable > tbody > tr > td > ul { 183 | padding-left: 0em; 184 | } 185 | 186 | table.indextable tr.pcap { 187 | height: 10px; 188 | } 189 | 190 | table.indextable tr.cap { 191 | margin-top: 10px; 192 | background-color: #f2f2f2; 193 | } 194 | 195 | img.toggler { 196 | margin-right: 3px; 197 | margin-top: 3px; 198 | cursor: pointer; 199 | } 200 | 201 | div.modindex-jumpbox { 202 | border-top: 1px solid #ddd; 203 | border-bottom: 1px solid #ddd; 204 | margin: 1em 0 1em 0; 205 | padding: 0.4em; 206 | } 207 | 208 | div.genindex-jumpbox { 209 | border-top: 1px solid #ddd; 210 | border-bottom: 1px solid #ddd; 211 | margin: 1em 0 1em 0; 212 | padding: 0.4em; 213 | } 214 | 215 | /* -- domain module index --------------------------------------------------- */ 216 | 217 | table.modindextable td { 218 | padding: 2px; 219 | border-collapse: collapse; 220 | } 221 | 222 | /* -- general body styles --------------------------------------------------- */ 223 | 224 | div.body { 225 | min-width: 360px; 226 | max-width: 800px; 227 | } 228 | 229 | div.body p, div.body dd, div.body li, div.body blockquote { 230 | -moz-hyphens: auto; 231 | -ms-hyphens: auto; 232 | -webkit-hyphens: auto; 233 | hyphens: auto; 234 | } 235 | 236 | a.headerlink { 237 | visibility: hidden; 238 | } 239 | 240 | a:visited { 241 | color: #551A8B; 242 | } 243 | 244 | h1:hover > a.headerlink, 245 | h2:hover > a.headerlink, 246 | h3:hover > a.headerlink, 247 | h4:hover > a.headerlink, 248 | h5:hover > a.headerlink, 249 | h6:hover > a.headerlink, 250 | dt:hover > a.headerlink, 251 | caption:hover > a.headerlink, 252 | p.caption:hover > a.headerlink, 253 | div.code-block-caption:hover > a.headerlink { 254 | visibility: visible; 255 | } 256 | 257 | div.body p.caption { 258 | text-align: inherit; 259 | } 260 | 261 | div.body td { 262 | text-align: left; 263 | } 264 | 265 | .first { 266 | margin-top: 0 !important; 267 | } 268 | 269 | p.rubric { 270 | margin-top: 30px; 271 | font-weight: bold; 272 | } 273 | 274 | img.align-left, figure.align-left, .figure.align-left, object.align-left { 275 | clear: left; 276 | float: left; 277 | margin-right: 1em; 278 | } 279 | 280 | img.align-right, figure.align-right, .figure.align-right, object.align-right { 281 | clear: right; 282 | float: right; 283 | margin-left: 1em; 284 | } 285 | 286 | img.align-center, figure.align-center, .figure.align-center, object.align-center { 287 | display: block; 288 | margin-left: auto; 289 | margin-right: auto; 290 | } 291 | 292 | img.align-default, figure.align-default, .figure.align-default { 293 | display: block; 294 | margin-left: auto; 295 | margin-right: auto; 296 | } 297 | 298 | .align-left { 299 | text-align: left; 300 | } 301 | 302 | .align-center { 303 | text-align: center; 304 | } 305 | 306 | .align-default { 307 | text-align: center; 308 | } 309 | 310 | .align-right { 311 | text-align: right; 312 | } 313 | 314 | /* -- sidebars -------------------------------------------------------------- */ 315 | 316 | div.sidebar, 317 | aside.sidebar { 318 | margin: 0 0 0.5em 1em; 319 | border: 1px solid #ddb; 320 | padding: 7px; 321 | background-color: #ffe; 322 | width: 40%; 323 | float: right; 324 | clear: right; 325 | overflow-x: auto; 326 | } 327 | 328 | p.sidebar-title { 329 | font-weight: bold; 330 | } 331 | 332 | nav.contents, 333 | aside.topic, 334 | div.admonition, div.topic, blockquote { 335 | clear: left; 336 | } 337 | 338 | /* -- topics ---------------------------------------------------------------- */ 339 | 340 | nav.contents, 341 | aside.topic, 342 | div.topic { 343 | border: 1px solid #ccc; 344 | padding: 7px; 345 | margin: 10px 0 10px 0; 346 | } 347 | 348 | p.topic-title { 349 | font-size: 1.1em; 350 | font-weight: bold; 351 | margin-top: 10px; 352 | } 353 | 354 | /* -- admonitions ----------------------------------------------------------- */ 355 | 356 | div.admonition { 357 | margin-top: 10px; 358 | margin-bottom: 10px; 359 | padding: 7px; 360 | } 361 | 362 | div.admonition dt { 363 | font-weight: bold; 364 | } 365 | 366 | p.admonition-title { 367 | margin: 0px 10px 5px 0px; 368 | font-weight: bold; 369 | } 370 | 371 | div.body p.centered { 372 | text-align: center; 373 | margin-top: 25px; 374 | } 375 | 376 | /* -- content of sidebars/topics/admonitions -------------------------------- */ 377 | 378 | div.sidebar > :last-child, 379 | aside.sidebar > :last-child, 380 | nav.contents > :last-child, 381 | aside.topic > :last-child, 382 | div.topic > :last-child, 383 | div.admonition > :last-child { 384 | margin-bottom: 0; 385 | } 386 | 387 | div.sidebar::after, 388 | aside.sidebar::after, 389 | nav.contents::after, 390 | aside.topic::after, 391 | div.topic::after, 392 | div.admonition::after, 393 | blockquote::after { 394 | display: block; 395 | content: ''; 396 | clear: both; 397 | } 398 | 399 | /* -- tables ---------------------------------------------------------------- */ 400 | 401 | table.docutils { 402 | margin-top: 10px; 403 | margin-bottom: 10px; 404 | border: 0; 405 | border-collapse: collapse; 406 | } 407 | 408 | table.align-center { 409 | margin-left: auto; 410 | margin-right: auto; 411 | } 412 | 413 | table.align-default { 414 | margin-left: auto; 415 | margin-right: auto; 416 | } 417 | 418 | table caption span.caption-number { 419 | font-style: italic; 420 | } 421 | 422 | table caption span.caption-text { 423 | } 424 | 425 | table.docutils td, table.docutils th { 426 | padding: 1px 8px 1px 5px; 427 | border-top: 0; 428 | border-left: 0; 429 | border-right: 0; 430 | border-bottom: 1px solid #aaa; 431 | } 432 | 433 | th { 434 | text-align: left; 435 | padding-right: 5px; 436 | } 437 | 438 | table.citation { 439 | border-left: solid 1px gray; 440 | margin-left: 1px; 441 | } 442 | 443 | table.citation td { 444 | border-bottom: none; 445 | } 446 | 447 | th > :first-child, 448 | td > :first-child { 449 | margin-top: 0px; 450 | } 451 | 452 | th > :last-child, 453 | td > :last-child { 454 | margin-bottom: 0px; 455 | } 456 | 457 | /* -- figures --------------------------------------------------------------- */ 458 | 459 | div.figure, figure { 460 | margin: 0.5em; 461 | padding: 0.5em; 462 | } 463 | 464 | div.figure p.caption, figcaption { 465 | padding: 0.3em; 466 | } 467 | 468 | div.figure p.caption span.caption-number, 469 | figcaption span.caption-number { 470 | font-style: italic; 471 | } 472 | 473 | div.figure p.caption span.caption-text, 474 | figcaption span.caption-text { 475 | } 476 | 477 | /* -- field list styles ----------------------------------------------------- */ 478 | 479 | table.field-list td, table.field-list th { 480 | border: 0 !important; 481 | } 482 | 483 | .field-list ul { 484 | margin: 0; 485 | padding-left: 1em; 486 | } 487 | 488 | .field-list p { 489 | margin: 0; 490 | } 491 | 492 | .field-name { 493 | -moz-hyphens: manual; 494 | -ms-hyphens: manual; 495 | -webkit-hyphens: manual; 496 | hyphens: manual; 497 | } 498 | 499 | /* -- hlist styles ---------------------------------------------------------- */ 500 | 501 | table.hlist { 502 | margin: 1em 0; 503 | } 504 | 505 | table.hlist td { 506 | vertical-align: top; 507 | } 508 | 509 | /* -- object description styles --------------------------------------------- */ 510 | 511 | .sig { 512 | font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 513 | } 514 | 515 | .sig-name, code.descname { 516 | background-color: transparent; 517 | font-weight: bold; 518 | } 519 | 520 | .sig-name { 521 | font-size: 1.1em; 522 | } 523 | 524 | code.descname { 525 | font-size: 1.2em; 526 | } 527 | 528 | .sig-prename, code.descclassname { 529 | background-color: transparent; 530 | } 531 | 532 | .optional { 533 | font-size: 1.3em; 534 | } 535 | 536 | .sig-paren { 537 | font-size: larger; 538 | } 539 | 540 | .sig-param.n { 541 | font-style: italic; 542 | } 543 | 544 | /* C++ specific styling */ 545 | 546 | .sig-inline.c-texpr, 547 | .sig-inline.cpp-texpr { 548 | font-family: unset; 549 | } 550 | 551 | .sig.c .k, .sig.c .kt, 552 | .sig.cpp .k, .sig.cpp .kt { 553 | color: #0033B3; 554 | } 555 | 556 | .sig.c .m, 557 | .sig.cpp .m { 558 | color: #1750EB; 559 | } 560 | 561 | .sig.c .s, .sig.c .sc, 562 | .sig.cpp .s, .sig.cpp .sc { 563 | color: #067D17; 564 | } 565 | 566 | 567 | /* -- other body styles ----------------------------------------------------- */ 568 | 569 | ol.arabic { 570 | list-style: decimal; 571 | } 572 | 573 | ol.loweralpha { 574 | list-style: lower-alpha; 575 | } 576 | 577 | ol.upperalpha { 578 | list-style: upper-alpha; 579 | } 580 | 581 | ol.lowerroman { 582 | list-style: lower-roman; 583 | } 584 | 585 | ol.upperroman { 586 | list-style: upper-roman; 587 | } 588 | 589 | :not(li) > ol > li:first-child > :first-child, 590 | :not(li) > ul > li:first-child > :first-child { 591 | margin-top: 0px; 592 | } 593 | 594 | :not(li) > ol > li:last-child > :last-child, 595 | :not(li) > ul > li:last-child > :last-child { 596 | margin-bottom: 0px; 597 | } 598 | 599 | ol.simple ol p, 600 | ol.simple ul p, 601 | ul.simple ol p, 602 | ul.simple ul p { 603 | margin-top: 0; 604 | } 605 | 606 | ol.simple > li:not(:first-child) > p, 607 | ul.simple > li:not(:first-child) > p { 608 | margin-top: 0; 609 | } 610 | 611 | ol.simple p, 612 | ul.simple p { 613 | margin-bottom: 0; 614 | } 615 | 616 | aside.footnote > span, 617 | div.citation > span { 618 | float: left; 619 | } 620 | aside.footnote > span:last-of-type, 621 | div.citation > span:last-of-type { 622 | padding-right: 0.5em; 623 | } 624 | aside.footnote > p { 625 | margin-left: 2em; 626 | } 627 | div.citation > p { 628 | margin-left: 4em; 629 | } 630 | aside.footnote > p:last-of-type, 631 | div.citation > p:last-of-type { 632 | margin-bottom: 0em; 633 | } 634 | aside.footnote > p:last-of-type:after, 635 | div.citation > p:last-of-type:after { 636 | content: ""; 637 | clear: both; 638 | } 639 | 640 | dl.field-list { 641 | display: grid; 642 | grid-template-columns: fit-content(30%) auto; 643 | } 644 | 645 | dl.field-list > dt { 646 | font-weight: bold; 647 | word-break: break-word; 648 | padding-left: 0.5em; 649 | padding-right: 5px; 650 | } 651 | 652 | dl.field-list > dd { 653 | padding-left: 0.5em; 654 | margin-top: 0em; 655 | margin-left: 0em; 656 | margin-bottom: 0em; 657 | } 658 | 659 | dl { 660 | margin-bottom: 15px; 661 | } 662 | 663 | dd > :first-child { 664 | margin-top: 0px; 665 | } 666 | 667 | dd ul, dd table { 668 | margin-bottom: 10px; 669 | } 670 | 671 | dd { 672 | margin-top: 3px; 673 | margin-bottom: 10px; 674 | margin-left: 30px; 675 | } 676 | 677 | .sig dd { 678 | margin-top: 0px; 679 | margin-bottom: 0px; 680 | } 681 | 682 | .sig dl { 683 | margin-top: 0px; 684 | margin-bottom: 0px; 685 | } 686 | 687 | dl > dd:last-child, 688 | dl > dd:last-child > :last-child { 689 | margin-bottom: 0; 690 | } 691 | 692 | dt:target, span.highlighted { 693 | background-color: #fbe54e; 694 | } 695 | 696 | rect.highlighted { 697 | fill: #fbe54e; 698 | } 699 | 700 | dl.glossary dt { 701 | font-weight: bold; 702 | font-size: 1.1em; 703 | } 704 | 705 | .versionmodified { 706 | font-style: italic; 707 | } 708 | 709 | .system-message { 710 | background-color: #fda; 711 | padding: 5px; 712 | border: 3px solid red; 713 | } 714 | 715 | .footnote:target { 716 | background-color: #ffa; 717 | } 718 | 719 | .line-block { 720 | display: block; 721 | margin-top: 1em; 722 | margin-bottom: 1em; 723 | } 724 | 725 | .line-block .line-block { 726 | margin-top: 0; 727 | margin-bottom: 0; 728 | margin-left: 1.5em; 729 | } 730 | 731 | .guilabel, .menuselection { 732 | font-family: sans-serif; 733 | } 734 | 735 | .accelerator { 736 | text-decoration: underline; 737 | } 738 | 739 | .classifier { 740 | font-style: oblique; 741 | } 742 | 743 | .classifier:before { 744 | font-style: normal; 745 | margin: 0 0.5em; 746 | content: ":"; 747 | display: inline-block; 748 | } 749 | 750 | abbr, acronym { 751 | border-bottom: dotted 1px; 752 | cursor: help; 753 | } 754 | 755 | .translated { 756 | background-color: rgba(207, 255, 207, 0.2) 757 | } 758 | 759 | .untranslated { 760 | background-color: rgba(255, 207, 207, 0.2) 761 | } 762 | 763 | /* -- code displays --------------------------------------------------------- */ 764 | 765 | pre { 766 | overflow: auto; 767 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 768 | } 769 | 770 | pre, div[class*="highlight-"] { 771 | clear: both; 772 | } 773 | 774 | span.pre { 775 | -moz-hyphens: none; 776 | -ms-hyphens: none; 777 | -webkit-hyphens: none; 778 | hyphens: none; 779 | white-space: nowrap; 780 | } 781 | 782 | div[class*="highlight-"] { 783 | margin: 1em 0; 784 | } 785 | 786 | td.linenos pre { 787 | border: 0; 788 | background-color: transparent; 789 | color: #aaa; 790 | } 791 | 792 | table.highlighttable { 793 | display: block; 794 | } 795 | 796 | table.highlighttable tbody { 797 | display: block; 798 | } 799 | 800 | table.highlighttable tr { 801 | display: flex; 802 | } 803 | 804 | table.highlighttable td { 805 | margin: 0; 806 | padding: 0; 807 | } 808 | 809 | table.highlighttable td.linenos { 810 | padding-right: 0.5em; 811 | } 812 | 813 | table.highlighttable td.code { 814 | flex: 1; 815 | overflow: hidden; 816 | } 817 | 818 | .highlight .hll { 819 | display: block; 820 | } 821 | 822 | div.highlight pre, 823 | table.highlighttable pre { 824 | margin: 0; 825 | } 826 | 827 | div.code-block-caption + div { 828 | margin-top: 0; 829 | } 830 | 831 | div.code-block-caption { 832 | margin-top: 1em; 833 | padding: 2px 5px; 834 | font-size: small; 835 | } 836 | 837 | div.code-block-caption code { 838 | background-color: transparent; 839 | } 840 | 841 | table.highlighttable td.linenos, 842 | span.linenos, 843 | div.highlight span.gp { /* gp: Generic.Prompt */ 844 | user-select: none; 845 | -webkit-user-select: text; /* Safari fallback only */ 846 | -webkit-user-select: none; /* Chrome/Safari */ 847 | -moz-user-select: none; /* Firefox */ 848 | -ms-user-select: none; /* IE10+ */ 849 | } 850 | 851 | div.code-block-caption span.caption-number { 852 | padding: 0.1em 0.3em; 853 | font-style: italic; 854 | } 855 | 856 | div.code-block-caption span.caption-text { 857 | } 858 | 859 | div.literal-block-wrapper { 860 | margin: 1em 0; 861 | } 862 | 863 | code.xref, a code { 864 | background-color: transparent; 865 | font-weight: bold; 866 | } 867 | 868 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 869 | background-color: transparent; 870 | } 871 | 872 | .viewcode-link { 873 | float: right; 874 | } 875 | 876 | .viewcode-back { 877 | float: right; 878 | font-family: sans-serif; 879 | } 880 | 881 | div.viewcode-block:target { 882 | margin: -1px -10px; 883 | padding: 0 10px; 884 | } 885 | 886 | /* -- math display ---------------------------------------------------------- */ 887 | 888 | img.math { 889 | vertical-align: middle; 890 | } 891 | 892 | div.body div.math p { 893 | text-align: center; 894 | } 895 | 896 | span.eqno { 897 | float: right; 898 | } 899 | 900 | span.eqno a.headerlink { 901 | position: absolute; 902 | z-index: 1; 903 | } 904 | 905 | div.math:hover a.headerlink { 906 | visibility: visible; 907 | } 908 | 909 | /* -- printout stylesheet --------------------------------------------------- */ 910 | 911 | @media print { 912 | div.document, 913 | div.documentwrapper, 914 | div.bodywrapper { 915 | margin: 0 !important; 916 | width: 100%; 917 | } 918 | 919 | div.sphinxsidebar, 920 | div.related, 921 | div.footer, 922 | #top-link { 923 | display: none; 924 | } 925 | } -------------------------------------------------------------------------------- /doc/build/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /doc/build/html/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /doc/build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Base JavaScript utilities for all Sphinx HTML documentation. 6 | * 7 | * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | "use strict"; 12 | 13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 14 | "TEXTAREA", 15 | "INPUT", 16 | "SELECT", 17 | "BUTTON", 18 | ]); 19 | 20 | const _ready = (callback) => { 21 | if (document.readyState !== "loading") { 22 | callback(); 23 | } else { 24 | document.addEventListener("DOMContentLoaded", callback); 25 | } 26 | }; 27 | 28 | /** 29 | * Small JavaScript module for the documentation. 30 | */ 31 | const Documentation = { 32 | init: () => { 33 | Documentation.initDomainIndexTable(); 34 | Documentation.initOnKeyListeners(); 35 | }, 36 | 37 | /** 38 | * i18n support 39 | */ 40 | TRANSLATIONS: {}, 41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 42 | LOCALE: "unknown", 43 | 44 | // gettext and ngettext don't access this so that the functions 45 | // can safely bound to a different name (_ = Documentation.gettext) 46 | gettext: (string) => { 47 | const translated = Documentation.TRANSLATIONS[string]; 48 | switch (typeof translated) { 49 | case "undefined": 50 | return string; // no translation 51 | case "string": 52 | return translated; // translation exists 53 | default: 54 | return translated[0]; // (singular, plural) translation tuple exists 55 | } 56 | }, 57 | 58 | ngettext: (singular, plural, n) => { 59 | const translated = Documentation.TRANSLATIONS[singular]; 60 | if (typeof translated !== "undefined") 61 | return translated[Documentation.PLURAL_EXPR(n)]; 62 | return n === 1 ? singular : plural; 63 | }, 64 | 65 | addTranslations: (catalog) => { 66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 67 | Documentation.PLURAL_EXPR = new Function( 68 | "n", 69 | `return (${catalog.plural_expr})` 70 | ); 71 | Documentation.LOCALE = catalog.locale; 72 | }, 73 | 74 | /** 75 | * helper function to focus on search bar 76 | */ 77 | focusSearchBar: () => { 78 | document.querySelectorAll("input[name=q]")[0]?.focus(); 79 | }, 80 | 81 | /** 82 | * Initialise the domain index toggle buttons 83 | */ 84 | initDomainIndexTable: () => { 85 | const toggler = (el) => { 86 | const idNumber = el.id.substr(7); 87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 88 | if (el.src.substr(-9) === "minus.png") { 89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 90 | toggledRows.forEach((el) => (el.style.display = "none")); 91 | } else { 92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 93 | toggledRows.forEach((el) => (el.style.display = "")); 94 | } 95 | }; 96 | 97 | const togglerElements = document.querySelectorAll("img.toggler"); 98 | togglerElements.forEach((el) => 99 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 100 | ); 101 | togglerElements.forEach((el) => (el.style.display = "")); 102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 103 | }, 104 | 105 | initOnKeyListeners: () => { 106 | // only install a listener if it is really needed 107 | if ( 108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 110 | ) 111 | return; 112 | 113 | document.addEventListener("keydown", (event) => { 114 | // bail for input elements 115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 116 | // bail with special keys 117 | if (event.altKey || event.ctrlKey || event.metaKey) return; 118 | 119 | if (!event.shiftKey) { 120 | switch (event.key) { 121 | case "ArrowLeft": 122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 123 | 124 | const prevLink = document.querySelector('link[rel="prev"]'); 125 | if (prevLink && prevLink.href) { 126 | window.location.href = prevLink.href; 127 | event.preventDefault(); 128 | } 129 | break; 130 | case "ArrowRight": 131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 132 | 133 | const nextLink = document.querySelector('link[rel="next"]'); 134 | if (nextLink && nextLink.href) { 135 | window.location.href = nextLink.href; 136 | event.preventDefault(); 137 | } 138 | break; 139 | } 140 | } 141 | 142 | // some keyboard layouts may need Shift to get / 143 | switch (event.key) { 144 | case "/": 145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 146 | Documentation.focusSearchBar(); 147 | event.preventDefault(); 148 | } 149 | }); 150 | }, 151 | }; 152 | 153 | // quick alias for translations 154 | const _ = Documentation.gettext; 155 | 156 | _ready(Documentation.init); 157 | -------------------------------------------------------------------------------- /doc/build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '0.1.4', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: false, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; -------------------------------------------------------------------------------- /doc/build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/file.png -------------------------------------------------------------------------------- /doc/build/html/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /doc/build/html/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /doc/build/html/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /doc/build/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | -------------------------------------------------------------------------------- /doc/build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/minus.png -------------------------------------------------------------------------------- /doc/build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/_static/plus.png -------------------------------------------------------------------------------- /doc/build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #f8f8f8; } 8 | .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #9C6500 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ 21 | .highlight .gr { color: #E40000 } /* Generic.Error */ 22 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 23 | .highlight .gi { color: #008400 } /* Generic.Inserted */ 24 | .highlight .go { color: #717171 } /* Generic.Output */ 25 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 26 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 27 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 28 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 29 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 30 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 31 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 32 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 33 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 34 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 35 | .highlight .m { color: #666666 } /* Literal.Number */ 36 | .highlight .s { color: #BA2121 } /* Literal.String */ 37 | .highlight .na { color: #687822 } /* Name.Attribute */ 38 | .highlight .nb { color: #008000 } /* Name.Builtin */ 39 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 40 | .highlight .no { color: #880000 } /* Name.Constant */ 41 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 42 | .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ 43 | .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ 44 | .highlight .nf { color: #0000FF } /* Name.Function */ 45 | .highlight .nl { color: #767600 } /* Name.Label */ 46 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 47 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 48 | .highlight .nv { color: #19177C } /* Name.Variable */ 49 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 50 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 51 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 52 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 56 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 57 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 58 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 59 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 60 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 62 | .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ 63 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ 65 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 66 | .highlight .sr { color: #A45A77 } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 68 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 70 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 71 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 72 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 73 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 74 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 75 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /doc/build/html/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | const rest = document.createTextNode(val.substr(pos + text.length)); 33 | parent.insertBefore( 34 | span, 35 | parent.insertBefore( 36 | rest, 37 | node.nextSibling 38 | ) 39 | ); 40 | node.nodeValue = val.substr(0, pos); 41 | /* There may be more occurrences of search term in this node. So call this 42 | * function recursively on the remaining fragment. 43 | */ 44 | _highlight(rest, addItems, text, className); 45 | 46 | if (isInSVG) { 47 | const rect = document.createElementNS( 48 | "http://www.w3.org/2000/svg", 49 | "rect" 50 | ); 51 | const bbox = parent.getBBox(); 52 | rect.x.baseVal.value = bbox.x; 53 | rect.y.baseVal.value = bbox.y; 54 | rect.width.baseVal.value = bbox.width; 55 | rect.height.baseVal.value = bbox.height; 56 | rect.setAttribute("class", className); 57 | addItems.push({ parent: parent, target: rect }); 58 | } 59 | } 60 | } else if (node.matches && !node.matches("button, select, textarea")) { 61 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 62 | } 63 | }; 64 | const _highlightText = (thisNode, text, className) => { 65 | let addItems = []; 66 | _highlight(thisNode, addItems, text, className); 67 | addItems.forEach((obj) => 68 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 69 | ); 70 | }; 71 | 72 | /** 73 | * Small JavaScript module for the documentation. 74 | */ 75 | const SphinxHighlight = { 76 | 77 | /** 78 | * highlight the search words provided in localstorage in the text 79 | */ 80 | highlightSearchWords: () => { 81 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 82 | 83 | // get and clear terms from localstorage 84 | const url = new URL(window.location); 85 | const highlight = 86 | localStorage.getItem("sphinx_highlight_terms") 87 | || url.searchParams.get("highlight") 88 | || ""; 89 | localStorage.removeItem("sphinx_highlight_terms") 90 | url.searchParams.delete("highlight"); 91 | window.history.replaceState({}, "", url); 92 | 93 | // get individual terms from highlight string 94 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 95 | if (terms.length === 0) return; // nothing to do 96 | 97 | // There should never be more than one element matching "div.body" 98 | const divBody = document.querySelectorAll("div.body"); 99 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 100 | window.setTimeout(() => { 101 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 102 | }, 10); 103 | 104 | const searchBox = document.getElementById("searchbox"); 105 | if (searchBox === null) return; 106 | searchBox.appendChild( 107 | document 108 | .createRange() 109 | .createContextualFragment( 110 | '" 114 | ) 115 | ); 116 | }, 117 | 118 | /** 119 | * helper function to hide the search marks again 120 | */ 121 | hideSearchWords: () => { 122 | document 123 | .querySelectorAll("#searchbox .highlight-link") 124 | .forEach((el) => el.remove()); 125 | document 126 | .querySelectorAll("span.highlighted") 127 | .forEach((el) => el.classList.remove("highlighted")); 128 | localStorage.removeItem("sphinx_highlight_terms") 129 | }, 130 | 131 | initEscapeListener: () => { 132 | // only install a listener if it is really needed 133 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 134 | 135 | document.addEventListener("keydown", (event) => { 136 | // bail for input elements 137 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 138 | // bail with special keys 139 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 140 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 141 | SphinxHighlight.hideSearchWords(); 142 | event.preventDefault(); 143 | } 144 | }); 145 | }, 146 | }; 147 | 148 | _ready(() => { 149 | /* Do not call highlightSearchWords() when we are on the search page. 150 | * It will highlight words from the *previous* search query. 151 | */ 152 | if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); 153 | SphinxHighlight.initEscapeListener(); 154 | }); 155 | -------------------------------------------------------------------------------- /doc/build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Index — GNNWR 0.1.4 documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 53 | 54 |
58 | 59 |
60 |
61 |
62 |
    63 |
  • 64 | 65 |
  • 66 |
  • 67 |
68 |
69 |
70 |
71 |
72 | 73 | 74 |

Index

75 | 76 |
77 | A 78 | | B 79 | | D 80 | | F 81 | | G 82 | | H 83 | | I 84 | | L 85 | | M 86 | | O 87 | | P 88 | | R 89 | | S 90 | | V 91 | | W 92 | 93 |
94 |

A

95 | 96 | 102 | 108 |
109 | 110 |

B

111 | 112 | 116 | 120 |
121 | 122 |

D

123 | 124 | 130 | 136 |
137 | 138 |

F

139 | 140 | 152 |
153 | 154 |

G

155 | 156 | 180 | 200 |
201 | 202 |

H

203 | 204 | 208 |
209 | 210 |

I

211 | 212 | 218 | 224 |
225 | 226 |

L

227 | 228 | 232 | 236 |
237 | 238 |

M

239 | 240 | 259 |
260 | 261 |

O

262 | 263 | 267 |
268 | 269 |

P

270 | 271 | 275 | 281 |
282 | 283 |

R

284 | 285 | 299 | 307 |
308 | 309 |

S

310 | 311 | 319 | 329 |
330 | 331 |

V

332 | 333 | 337 |
338 | 339 |

W

340 | 341 | 345 | 349 |
350 | 351 | 352 | 353 |
354 |
355 |
356 | 357 |
358 | 359 |
360 |

© Copyright 2023, gnnwr.

361 |
362 | 363 | Built with Sphinx using a 364 | theme 365 | provided by Read the Docs. 366 | 367 | 368 |
369 |
370 |
371 |
372 |
373 | 378 | 379 | 380 | -------------------------------------------------------------------------------- /doc/build/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Welcome to GNNWR’s documentation! — GNNWR 0.1.4 documentation 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 55 | 56 |
60 | 61 |
62 |
63 |
64 | 71 |
72 |
73 |
74 |
75 | 76 |
77 |

Welcome to GNNWR’s documentation!

78 | 162 |
163 |
164 |

Indices and tables

165 | 170 |
171 | 172 | 173 |
174 |
175 |
178 | 179 |
180 | 181 |
182 |

© Copyright 2023, gnnwr.

183 |
184 | 185 | Built with Sphinx using a 186 | theme 187 | provided by Read the Docs. 188 | 189 | 190 |
191 |
192 |
193 |
194 |
195 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /doc/build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjuwss/gnnwr/caca89c88fe736c695c7f17a8d866626cd0af845/doc/build/html/objects.inv -------------------------------------------------------------------------------- /doc/build/html/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Python Module Index — GNNWR 0.1.4 documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 56 | 57 |
61 | 62 |
63 |
64 |
65 |
    66 |
  • 67 | 68 |
  • 69 |
  • 70 |
71 |
72 |
73 |
74 |
75 | 76 | 77 |

Python Module Index

78 | 79 |
80 | g 81 |
82 | 83 | 84 | 85 | 87 | 88 | 90 | 93 | 94 | 95 | 98 | 99 | 100 | 103 | 104 | 105 | 108 | 109 | 110 | 113 |
 
86 | g
91 | gnnwr 92 |
    96 | gnnwr.datasets 97 |
    101 | gnnwr.models 102 |
    106 | gnnwr.networks 107 |
    111 | gnnwr.utils 112 |
114 | 115 | 116 |
117 |
118 |
119 | 120 |
121 | 122 |
123 |

© Copyright 2023, gnnwr.

124 |
125 | 126 | Built with Sphinx using a 127 | theme 128 | provided by Read the Docs. 129 | 130 | 131 |
132 |
133 |
134 |
135 |
136 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /doc/build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search — GNNWR 0.1.4 documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 56 | 57 |
61 | 62 |
63 |
64 |
65 |
    66 |
  • 67 | 68 |
  • 69 |
  • 70 |
71 |
72 |
73 |
74 |
75 | 76 | 83 | 84 | 85 |
86 | 87 |
88 | 89 |
90 |
91 |
92 | 93 |
94 | 95 |
96 |

© Copyright 2023, gnnwr.

97 |
98 | 99 | Built with Sphinx using a 100 | theme 101 | provided by Read the Docs. 102 | 103 | 104 |
105 |
106 |
107 |
108 |
109 | 114 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /doc/build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({"docnames": ["gnnwr/datasets", "gnnwr/models", "gnnwr/networks", "gnnwr/utils", "index"], "filenames": ["gnnwr/datasets.rst", "gnnwr/models.rst", "gnnwr/networks.rst", "gnnwr/utils.rst", "index.rst"], "titles": ["gnnwr.datasets module", "gnnwr.models module", "gnnwr.networks module", "gnnwr.utils module", "Welcome to GNNWR\u2019s documentation!"], "terms": {"basicdist": [0, 4], "x": [0, 2], "y": [0, 1], "sourc": [0, 1, 2, 3], "calcul": [0, 2, 3], "distanc": 0, "between": 0, "two": [0, 2], "point": 0, "paramet": [0, 1, 2, 3], "input": [0, 1, 2, 3], "coordin": 0, "data": [0, 3], "target": 0, "return": [0, 1, 2, 3], "matrix": [0, 3], "manhattan_dist": [0, 4], "manhattan": 0, "class": [0, 1, 2, 3], "basedataset": [0, 1, 4], "none": [0, 1, 2, 3], "x_column": 0, "list": [0, 1, 2, 3], "y_column": [0, 3], "id_column": 0, "is_need_stnn": 0, "fals": [0, 1, 2], "base": [0, 1, 2, 3], "i": [0, 1, 2, 3], "which": [0, 1, 2], "us": [0, 1, 2], "store": 0, "other": [0, 1], "inform": [0, 1], "also": 0, "provid": 0, "function": [0, 1, 2], "scale": [0, 4], "save": [0, 1, 4], "load": [0, 1], "independ": [0, 3], "variabl": [0, 3], "column": [0, 3], "name": [0, 1, 3], "depend": [0, 3], "whether": [0, 1, 2], "stnn": [0, 1, 2], "getscaleddatafram": [0, 4], "get": [0, 1, 3], "datafram": [0, 1], "read": [0, 4], "dirnam": 0, "directori": 0, "rescal": [0, 4], "scale_fn": 0, "scale_param": 0, "minmaxscal": 0, "standardscal": 0, "like": 0, "scale2": [0, 4], "max": [0, 1], "min": [0, 1], "init_dataset": [0, 4], "test_ratio": 0, "valid_ratio": 0, "spatial_column": 0, "temp_column": 0, "sample_se": 0, "100": [0, 1], "process_fn": 0, "minmax_scal": [0, 4], "batch_siz": 0, "32": [0, 1], "shuffl": 0, "true": [0, 1, 2], "use_class": 0, "spatial_fun": 0, "temporal_fun": 0, "max_val_s": 0, "1": [0, 1, 2], "max_test_s": 0, "from_for_cv": 0, "0": [0, 1, 2], "refer": 0, "simple_dist": 0, "initi": [0, 1], "train": [0, 1], "set": 0, "valid": [0, 1], "test": [0, 1, 3], "model": [0, 2, 4], "ratio": 0, "attribut": 0, "output": [0, 1, 2, 3], "spatial": [0, 1, 2], "tempor": [0, 1, 2], "random": 0, "seed": 0, "pre": 0, "process": [0, 1], "batch": [0, 1, 2], "size": [0, 1, 2], "one": [0, 1, 2], "inject": 0, "start": [0, 1], "index": [0, 4], "cross": 0, "simpl": 0, "init_dataset_cv": [0, 4], "k_fold": 0, "k": 0, "fold": 0, "label": 0, "id": 0, "need": [0, 2], "cv_data_set": 0, "test_dataset": [0, 1], "init_predict_dataset": [0, 4], "train_dataset": [0, 1], "scale_sync": 0, "predictdataset": [0, 1, 4], "max_siz": 0, "predict": [0, 1, 4], "sync": 0, "predict_dataset": 0, "load_dataset": [0, 4], "scale_info": 0, "minmax": 0, "scaler": 0, "minimum": [0, 1], "valu": 0, "each": [0, 1, 2], "maximum": [0, 1], "standard_scal": [0, 4], "mean": 0, "std": 0, "standard": 0, "deviat": 0, "valid_dataset": 1, "dense_lay": [1, 2], "start_lr": 1, "float": [1, 2], "optim": 1, "adagrad": 1, "drop_out": [1, 2], "2": [1, 2], "batch_norm": [1, 2], "activate_func": [1, 2], "prelu": [1, 2], "num_paramet": [1, 2], "model_nam": 1, "gnnwr_20231128": 1, "111456": 1, "model_save_path": 1, "gnnwr_model": 1, "write_path": 1, "gnnwr_run": 1, "20231128": 1, "use_gpu": 1, "bool": [1, 2], "use_ol": 1, "log_path": 1, "gnnwr_log": 1, "log_file_nam": 1, "gnnwr20231128": 1, "log": 1, "log_level": 1, "20": [1, 3], "optimizer_param": 1, "object": [1, 3], "geograph": 1, "neural": [1, 2, 3], "network": [1, 3, 4], "weight": [1, 2, 3], "regress": 1, "address": 1, "non": 1, "stationar": 1, "variou": 1, "domain": 1, "complex": 1, "come": 1, "from": 1, "paper": 1, "accur": 1, "estim": 1, "dataset": [1, 3, 4], "dens": [1, 2], "layer": [1, 2], "default": [1, 2], "structur": 1, "geometr": 1, "sequenc": 1, "power": 1, "closest": 1, "number": 1, "neuron": 1, "e": 1, "4": [1, 3], "8": 1, "16": 1, "64": 1, "128": 1, "256": 1, "learn": 1, "rate": [1, 2], "str": 1, "option": 1, "choos": 1, "sgd": 1, "adam": 1, "rmsprop": 1, "adadelta": 1, "drop": [1, 2], "out": [1, 2], "normal": [1, 2], "torch": [1, 2], "nn": [1, 2], "activ": [1, 2], "init": [1, 2], "gnnwr_": 1, "datetim": 1, "todai": 1, "strftime": 1, "m": 1, "d": 1, "h": 1, "": [1, 3], "path": 1, "now": 1, "gpu": 1, "ol": [1, 3, 4], "int": [1, 2], "level": 1, "info": 1, "dict": 1, "param": [1, 3], "schedul": 1, "ar": 1, "maxlr": 1, "minlr": 1, "01": 1, "upepoch": 1, "epoch": 1, "up": 1, "10000": 1, "decayepoch": 1, "decai": 1, "20000": 1, "decayr": 1, "stop_change_epoch": 1, "stop": 1, "chang": 1, "30000": 1, "stop_lr": 1, "when": 1, "001": 1, "cosineannealingwarmrestart": 1, "multisteplr": 1, "cosineannealinglr": 1, "scheduler_mileston": 1, "mileston": 1, "500": 1, "1000": 1, "2000": 1, "4000": 1, "scheduler_gamma": 1, "gamma": 1, "5": 1, "scheduler_t_max": 1, "t_max": 1, "scheduler_eta_min": 1, "eta_min": 1, "scheduler_t_0": 1, "t_0": 1, "scheduler_t_mult": 1, "t_mult": 1, "3": 1, "add_graph": [1, 4], "add": 1, "graph": 1, "tensorboard": 1, "getloss": [1, 4], "loss": 1, "type": [1, 2], "getweight": [1, 4], "argument": 1, "panda": 1, "gpumodel_to_cpu": [1, 4], "save_path": 1, "use_model": 1, "convert": 1, "cpu": 1, "new": 1, "init_optim": [1, 4], "load_model": [1, 4], "use_dict": 1, "map_loc": 1, "locat": 1, "can": 1, "cuda": 1, "result": [1, 3, 4], "predict_weight": [1, 4], "reg_result": [1, 4], "filenam": 1, "model_path": 1, "only_return": 1, "includ": 1, "bia": 1, "file": 1, "self": 1, "_modelsavepath": 1, "_modelnam": 1, "pkl": 1, "onli": 1, "print": 1, "run": [1, 2, 4], "max_epoch": 1, "early_stop": 1, "print_frequ": 1, "50": 1, "show_detailed_info": 1, "ha": 1, "been": 1, "updat": 1, "until": 1, "frequenc": 1, "gtnnwr": [1, 3, 4], "gtnnwr_20231128": 1, "gtnnwr_model": 1, "gtnnwr_run": 1, "gtnnwr_log": 1, "gtnnwr20231128": 1, "stpnn_outsiz": 1, "stnn_spnn_param": 1, "stpnn": [1, 2, 4], "solv": 1, "problem": 1, "first": 1, "hidden": 1, "second": 1, "swnn": [1, 2, 4], "spnn": [1, 2], "stpnn_batch_norm": 1, "batchnorm": 1, "stnn_spnn": [2, 4], "stnn_insiz": 2, "stnn_outsiz": 2, "spnn_insiz": 2, "spnn_outsiz": 2, "relu": 2, "proxim": 2, "node": 2, "same": 2, "time": 2, "The": 2, "follow": 2, "full": 2, "connect": 2, "must": 2, "posit": 2, "forward": [2, 4], "input1": 2, "defin": 2, "comput": 2, "perform": 2, "everi": 2, "call": 2, "should": 2, "overridden": 2, "all": [2, 3], "subclass": 2, "although": 2, "recip": 2, "pass": 2, "within": 2, "thi": 2, "instanc": 2, "afterward": 2, "instead": 2, "sinc": 2, "former": 2, "take": 2, "care": 2, "regist": 2, "hook": 2, "while": 2, "latter": 2, "silent": 2, "ignor": 2, "them": 2, "insiz": 2, "outsiz": 2, "featur": 2, "default_dense_lay": [2, 4], "gener": 2, "weight_shar": [2, 4], "output_s": 2, "share": 2, "tensor": 2, "diagnosi": [3, 4], "x_data": 3, "y_data": 3, "y_pred": 3, "diagnos": 3, "aic": [3, 4], "aicc": [3, 4], "adjust_r2": [3, 4], "adjust": 3, "r2": [3, 4], "f1_gnn": [3, 4], "f1": 3, "rmse": [3, 4], "hat": [3, 4], "xname": 3, "yname": 3, "olr": 3, "visual": [3, 4], "lon_lat_column": 3, "zoom": 3, "display_dataset": [3, 4], "color": 3, "step": 3, "vmin": 3, "vmax": 3, "dot_map": [3, 4], "lon_column": 3, "lat_column": 3, "weights_heatmap": [3, 4], "data_column": 3, "modul": 4, "util": 4, "search": 4, "page": 4}, "objects": {"gnnwr": [[0, 0, 0, "-", "datasets"], [1, 0, 0, "-", "models"], [2, 0, 0, "-", "networks"], [3, 0, 0, "-", "utils"]], "gnnwr.datasets": [[0, 1, 1, "", "BasicDistance"], [0, 1, 1, "", "Manhattan_distance"], [0, 2, 1, "", "baseDataset"], [0, 1, 1, "", "init_dataset"], [0, 1, 1, "", "init_dataset_cv"], [0, 1, 1, "", "init_predict_dataset"], [0, 1, 1, "", "load_dataset"], [0, 2, 1, "", "predictDataset"]], "gnnwr.datasets.baseDataset": [[0, 3, 1, "", "getScaledDataframe"], [0, 3, 1, "", "read"], [0, 3, 1, "", "rescale"], [0, 3, 1, "", "save"], [0, 3, 1, "", "scale"], [0, 3, 1, "", "scale2"]], "gnnwr.datasets.predictDataset": [[0, 3, 1, "", "minmax_scaler"], [0, 3, 1, "", "rescale"], [0, 3, 1, "", "standard_scaler"]], "gnnwr.models": [[1, 2, 1, "", "GNNWR"], [1, 2, 1, "", "GTNNWR"]], "gnnwr.models.GNNWR": [[1, 3, 1, "", "add_graph"], [1, 3, 1, "", "getLoss"], [1, 3, 1, "", "getWeights"], [1, 3, 1, "", "gpumodel_to_cpu"], [1, 3, 1, "", "init_optimizer"], [1, 3, 1, "", "load_model"], [1, 3, 1, "", "predict"], [1, 3, 1, "", "predict_weight"], [1, 3, 1, "", "reg_result"], [1, 3, 1, "", "result"], [1, 3, 1, "", "run"]], "gnnwr.networks": [[2, 2, 1, "", "STNN_SPNN"], [2, 2, 1, "", "STPNN"], [2, 2, 1, "", "SWNN"], [2, 1, 1, "", "default_dense_layer"], [2, 1, 1, "", "weight_share"]], "gnnwr.networks.STNN_SPNN": [[2, 3, 1, "", "forward"]], "gnnwr.networks.STPNN": [[2, 3, 1, "", "forward"]], "gnnwr.networks.SWNN": [[2, 3, 1, "", "forward"]], "gnnwr.utils": [[3, 2, 1, "", "DIAGNOSIS"], [3, 2, 1, "", "OLS"], [3, 2, 1, "", "Visualize"]], "gnnwr.utils.DIAGNOSIS": [[3, 3, 1, "", "AIC"], [3, 3, 1, "", "AICc"], [3, 3, 1, "", "Adjust_R2"], [3, 3, 1, "", "F1_GNN"], [3, 3, 1, "", "R2"], [3, 3, 1, "", "RMSE"], [3, 3, 1, "", "hat"]], "gnnwr.utils.Visualize": [[3, 3, 1, "", "display_dataset"], [3, 3, 1, "", "dot_map"], [3, 3, 1, "", "weights_heatmap"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"gnnwr": [0, 1, 2, 3, 4], "dataset": 0, "modul": [0, 1, 2, 3], "model": 1, "network": 2, "util": 3, "welcom": 4, "": 4, "document": 4, "content": 4, "indic": 4, "tabl": 4}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"gnnwr.datasets module": [[0, "module-gnnwr.datasets"]], "gnnwr.models module": [[1, "module-gnnwr.models"]], "gnnwr.networks module": [[2, "module-gnnwr.networks"]], "gnnwr.utils module": [[3, "module-gnnwr.utils"]], "Welcome to GNNWR\u2019s documentation!": [[4, "welcome-to-gnnwr-s-documentation"]], "Contents:": [[4, null]], "Indices and tables": [[4, "indices-and-tables"]]}, "indexentries": {"basicdistance() (in module gnnwr.datasets)": [[0, "gnnwr.datasets.BasicDistance"]], "manhattan_distance() (in module gnnwr.datasets)": [[0, "gnnwr.datasets.Manhattan_distance"]], "basedataset (class in gnnwr.datasets)": [[0, "gnnwr.datasets.baseDataset"]], "getscaleddataframe() (gnnwr.datasets.basedataset method)": [[0, "gnnwr.datasets.baseDataset.getScaledDataframe"]], "gnnwr.datasets": [[0, "module-gnnwr.datasets"]], "init_dataset() (in module gnnwr.datasets)": [[0, "gnnwr.datasets.init_dataset"]], "init_dataset_cv() (in module gnnwr.datasets)": [[0, "gnnwr.datasets.init_dataset_cv"]], "init_predict_dataset() (in module gnnwr.datasets)": [[0, "gnnwr.datasets.init_predict_dataset"]], "load_dataset() (in module gnnwr.datasets)": [[0, "gnnwr.datasets.load_dataset"]], "minmax_scaler() (gnnwr.datasets.predictdataset method)": [[0, "gnnwr.datasets.predictDataset.minmax_scaler"]], "module": [[0, "module-gnnwr.datasets"], [1, "module-gnnwr.models"], [2, "module-gnnwr.networks"], [3, "module-gnnwr.utils"]], "predictdataset (class in gnnwr.datasets)": [[0, "gnnwr.datasets.predictDataset"]], "read() (gnnwr.datasets.basedataset method)": [[0, "gnnwr.datasets.baseDataset.read"]], "rescale() (gnnwr.datasets.basedataset method)": [[0, "gnnwr.datasets.baseDataset.rescale"]], "rescale() (gnnwr.datasets.predictdataset method)": [[0, "gnnwr.datasets.predictDataset.rescale"]], "save() (gnnwr.datasets.basedataset method)": [[0, "gnnwr.datasets.baseDataset.save"]], "scale() (gnnwr.datasets.basedataset method)": [[0, "gnnwr.datasets.baseDataset.scale"]], "scale2() (gnnwr.datasets.basedataset method)": [[0, "gnnwr.datasets.baseDataset.scale2"]], "standard_scaler() (gnnwr.datasets.predictdataset method)": [[0, "gnnwr.datasets.predictDataset.standard_scaler"]], "gnnwr (class in gnnwr.models)": [[1, "gnnwr.models.GNNWR"]], "gtnnwr (class in gnnwr.models)": [[1, "gnnwr.models.GTNNWR"]], "add_graph() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.add_graph"]], "getloss() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.getLoss"]], "getweights() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.getWeights"]], "gnnwr.models": [[1, "module-gnnwr.models"]], "gpumodel_to_cpu() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.gpumodel_to_cpu"]], "init_optimizer() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.init_optimizer"]], "load_model() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.load_model"]], "predict() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.predict"]], "predict_weight() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.predict_weight"]], "reg_result() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.reg_result"]], "result() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.result"]], "run() (gnnwr.models.gnnwr method)": [[1, "gnnwr.models.GNNWR.run"]], "stnn_spnn (class in gnnwr.networks)": [[2, "gnnwr.networks.STNN_SPNN"]], "stpnn (class in gnnwr.networks)": [[2, "gnnwr.networks.STPNN"]], "swnn (class in gnnwr.networks)": [[2, "gnnwr.networks.SWNN"]], "default_dense_layer() (in module gnnwr.networks)": [[2, "gnnwr.networks.default_dense_layer"]], "forward() (gnnwr.networks.stnn_spnn method)": [[2, "gnnwr.networks.STNN_SPNN.forward"]], "forward() (gnnwr.networks.stpnn method)": [[2, "gnnwr.networks.STPNN.forward"]], "forward() (gnnwr.networks.swnn method)": [[2, "gnnwr.networks.SWNN.forward"]], "gnnwr.networks": [[2, "module-gnnwr.networks"]], "weight_share() (in module gnnwr.networks)": [[2, "gnnwr.networks.weight_share"]], "aic() (gnnwr.utils.diagnosis method)": [[3, "gnnwr.utils.DIAGNOSIS.AIC"]], "aicc() (gnnwr.utils.diagnosis method)": [[3, "gnnwr.utils.DIAGNOSIS.AICc"]], "adjust_r2() (gnnwr.utils.diagnosis method)": [[3, "gnnwr.utils.DIAGNOSIS.Adjust_R2"]], "diagnosis (class in gnnwr.utils)": [[3, "gnnwr.utils.DIAGNOSIS"]], "f1_gnn() (gnnwr.utils.diagnosis method)": [[3, "gnnwr.utils.DIAGNOSIS.F1_GNN"]], "ols (class in gnnwr.utils)": [[3, "gnnwr.utils.OLS"]], "r2() (gnnwr.utils.diagnosis method)": [[3, "gnnwr.utils.DIAGNOSIS.R2"]], "rmse() (gnnwr.utils.diagnosis method)": [[3, "gnnwr.utils.DIAGNOSIS.RMSE"]], "visualize (class in gnnwr.utils)": [[3, "gnnwr.utils.Visualize"]], "display_dataset() (gnnwr.utils.visualize method)": [[3, "gnnwr.utils.Visualize.display_dataset"]], "dot_map() (gnnwr.utils.visualize method)": [[3, "gnnwr.utils.Visualize.dot_map"]], "gnnwr.utils": [[3, "module-gnnwr.utils"]], "hat() (gnnwr.utils.diagnosis method)": [[3, "gnnwr.utils.DIAGNOSIS.hat"]], "weights_heatmap() (gnnwr.utils.visualize method)": [[3, "gnnwr.utils.Visualize.weights_heatmap"]]}}) -------------------------------------------------------------------------------- /doc/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /doc/source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # For the full list of built-in configuration values, see the documentation: 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 5 | 6 | # -- Project information ----------------------------------------------------- 7 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information 8 | import os 9 | import sys 10 | sys.path.insert(0,os.path.abspath('../../src')) 11 | project = 'GNNWR' 12 | copyright = '2023, gnnwr' 13 | author = 'gnnwr' 14 | release = '0.1.4' 15 | 16 | # -- General configuration --------------------------------------------------- 17 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration 18 | 19 | extensions = ['sphinx.ext.autodoc', 20 | 'sphinx.ext.doctest', 21 | 'sphinx.ext.intersphinx', 22 | 'sphinx.ext.todo', 23 | 'sphinx.ext.coverage', 24 | 'sphinx.ext.mathjax', 25 | 'sphinx.ext.napoleon', 26 | 'sphinx.ext.githubpages', 27 | 'sphinx.ext.viewcode' 28 | ] 29 | 30 | 31 | templates_path = ['_templates'] 32 | exclude_patterns = [] 33 | 34 | 35 | 36 | # -- Options for HTML output ------------------------------------------------- 37 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output 38 | 39 | html_theme = 'sphinx_rtd_theme' 40 | html_static_path = ['_static'] 41 | -------------------------------------------------------------------------------- /doc/source/index.rst: -------------------------------------------------------------------------------- 1 | .. GNNWR documentation master file, created by 2 | sphinx-quickstart on Sat Sep 16 22:25:09 2023. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to GNNWR's documentation! 7 | ================================= 8 | 9 | .. toctree:: 10 | :maxdepth: 3 11 | :caption: Contents: 12 | :glob: 13 | 14 | gnnwr/* 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy>=1.21.0 2 | pandas >=1.5.3 3 | scikit_learn>=1.0.2 4 | statsmodels>=0.13.5 5 | torch>=1.8.1 6 | tqdm>=4.63.0 7 | 8 | folium~=0.14.0 9 | branca~=0.6.0 10 | scipy~=1.10.1 11 | scikit-learn~=1.2.2 -------------------------------------------------------------------------------- /src/gnnwr/__init__.py: -------------------------------------------------------------------------------- 1 | from .datasets import * 2 | from .models import * 3 | from .networks import * 4 | from .utils import * -------------------------------------------------------------------------------- /src/gnnwr/networks.py: -------------------------------------------------------------------------------- 1 | import math 2 | import torch 3 | import torch.nn as nn 4 | 5 | 6 | def default_dense_layer(insize, outsize): 7 | """ 8 | generate default dense layers for neural network 9 | 10 | Parameters 11 | ---------- 12 | insize: int 13 | input size of neural network 14 | outsize: int 15 | output size of neural network 16 | 17 | Returns 18 | ------- 19 | dense_layer: list 20 | a list of dense layers of neural network 21 | """ 22 | dense_layer = [] 23 | size = int(math.pow(2, int(math.log2(insize)))) 24 | while size > outsize: 25 | dense_layer.append(size) 26 | size = int(math.pow(2, int(math.log2(size)) - 1)) 27 | return dense_layer 28 | 29 | class LinearNetwork(nn.Module): 30 | """ 31 | LinearNetwork is a neural network with dense layers, which is used to calculate the weight of features. 32 | | The each layer of LinearNetwork is as follows: 33 | | full connection layer -> batch normalization layer -> activate function -> drop out layer 34 | 35 | Parameters 36 | ---------- 37 | dense_layer: list 38 | a list of dense layers of Neural Network 39 | insize: int 40 | input size of Neural Network(must be positive) 41 | outsize: int 42 | Output size of Neural Network(must be positive) 43 | drop_out: float 44 | drop out rate(default: ``0.2``) 45 | activate_func: torch.nn.functional 46 | activate function(default: ``nn.PReLU(init=0.1)``) 47 | batch_norm: bool 48 | whether use batch normalization(default: ``True``) 49 | """ 50 | def __init__(self, insize, outsize, drop_out=0, activate_func=None, batch_norm=False): 51 | super(LinearNetwork, self).__init__() 52 | self.layer = nn.Linear(insize, outsize) 53 | if drop_out < 0 or drop_out > 1: 54 | raise ValueError("drop_out must be in [0, 1]") 55 | elif drop_out == 0: 56 | self.drop_out = nn.Identity() 57 | else: 58 | self.drop_out = nn.Dropout(drop_out) 59 | if batch_norm: 60 | self.batch_norm = nn.BatchNorm1d(outsize) 61 | else: 62 | self.batch_norm = nn.Identity() 63 | 64 | if activate_func is None: 65 | self.activate_func = nn.Identity() 66 | else: 67 | self.activate_func = activate_func 68 | self.reset_parameter() 69 | 70 | def reset_parameter(self): 71 | torch.nn.init.kaiming_uniform_(self.layer.weight, a=0, mode='fan_in') 72 | if self.layer.bias is not None: 73 | self.layer.bias.data.fill_(0) 74 | 75 | def forward(self, x): 76 | x = x.to(torch.float32) 77 | x = self.layer(x) 78 | x = self.batch_norm(x) 79 | x = self.activate_func(x) 80 | x = self.drop_out(x) 81 | return x 82 | 83 | def __str__(self) -> str: 84 | return f"LinearNetwork: {self.layer.in_features} -> {self.layer.out_features}\n" + \ 85 | f"Dropout: {self.drop_out.p}\n" + \ 86 | f"BatchNorm: {self.batch_norm}\n" + \ 87 | f"Activation: {self.activate_func}" 88 | 89 | def __repr__(self) -> str: 90 | return self.__str__() 91 | 92 | class SWNN(nn.Module): 93 | """ 94 | SWNN is a neural network with dense layers, which is used to calculate the spatial and temporal weight of features. 95 | | The each layer of SWNN is as follows: 96 | | full connection layer -> batch normalization layer -> activate function -> drop out layer 97 | 98 | Parameters 99 | ---------- 100 | dense_layer: list 101 | a list of dense layers of Neural Network 102 | insize: int 103 | input size of Neural Network(must be positive) 104 | outsize: int 105 | Output size of Neural Network(must be positive) 106 | drop_out: float 107 | drop out rate(default: ``0.2``) 108 | activate_func: torch.nn.functional 109 | activate function(default: ``nn.PReLU(init=0.1)``) 110 | batch_norm: bool 111 | whether use batch normalization(default: ``True``) 112 | """ 113 | def __init__(self, dense_layer=None, insize=-1, outsize=-1, drop_out=0.2, activate_func=nn.PReLU(init=0.1), 114 | batch_norm=True): 115 | 116 | super(SWNN, self).__init__() 117 | if dense_layer is None or len(dense_layer) == 0: 118 | self.dense_layer = default_dense_layer(insize, outsize) 119 | else: 120 | self.dense_layer = dense_layer 121 | if insize < 0 or outsize < 0: 122 | raise ValueError("insize and outsize must be positive") 123 | self.drop_out = drop_out 124 | self.batch_norm = batch_norm 125 | self.activate_func = activate_func 126 | self.insize = insize 127 | self.outsize = outsize 128 | count = 0 # used to name layers 129 | lastsize = self.insize # used to record the size of last layer 130 | self.fc = nn.Sequential() 131 | 132 | for size in self.dense_layer: 133 | # add full connection layer 134 | self.fc.add_module("swnn_full" + str(count), 135 | LinearNetwork(lastsize, size, drop_out, activate_func, batch_norm)) 136 | lastsize = size 137 | count += 1 138 | self.fc.add_module("full" + str(count), 139 | LinearNetwork(lastsize, self.outsize)) 140 | def forward(self, x): 141 | x = x.to(torch.float32) 142 | x = self.fc(x) 143 | return x 144 | 145 | 146 | class STPNN(nn.Module): 147 | """ 148 | STPNN is a neural network with dense layers, which is used to calculate the spatial and temporal proximity 149 | of two nodes. 150 | | The each layer of STPNN is as follows: 151 | | full connection layer -> batch normalization layer -> activate function -> drop out layer 152 | 153 | Parameters 154 | ---------- 155 | dense_layer: list 156 | a list of dense layers of Neural Network 157 | insize: int 158 | input size of Neural Network(must be positive) 159 | outsize: int 160 | Output size of Neural Network(must be positive) 161 | drop_out: float 162 | drop out rate(default: ``0.2``) 163 | activate_func: torch.nn.functional 164 | activate function(default: ``nn.ReLU()``) 165 | batch_norm: bool 166 | whether use batch normalization(default: ``False``) 167 | """ 168 | def __init__(self, dense_layer, insize, outsize, drop_out=0.2, activate_func=nn.ReLU(), batch_norm=False): 169 | 170 | super(STPNN, self).__init__() 171 | # default dense layer 172 | self.dense_layer = dense_layer 173 | self.drop_out = drop_out 174 | self.batch_norm = batch_norm 175 | self.activate_func = activate_func 176 | self.insize = insize 177 | self.outsize = outsize 178 | count = 0 # used to name layers 179 | lastsize = self.insize # used to record the size of last layer 180 | self.fc = nn.Sequential() 181 | for size in self.dense_layer: 182 | self.fc.add_module("stpnn_full" + str(count), 183 | LinearNetwork(lastsize, size, drop_out, activate_func, batch_norm)) 184 | lastsize = size 185 | count += 1 186 | self.fc.add_module("full" + str(count), 187 | LinearNetwork(lastsize, self.outsize,activate_func=activate_func)) 188 | 189 | def forward(self, x): 190 | # STPNN 191 | x = x.to(torch.float32) 192 | batch = x.shape[0] 193 | height = x.shape[1] 194 | x = torch.reshape(x, shape=(batch * height, x.shape[2])) 195 | output = self.fc(x) 196 | output = torch.reshape(output, shape=(batch, height * self.outsize)) 197 | return output 198 | 199 | 200 | class STNN_SPNN(nn.Module): 201 | """ 202 | STNN_SPNN is a neural network with dense layers, which is used to calculate the spatial proximity of two nodes 203 | and temporal proximity of two nodes at the same time. 204 | | The each layer of STNN and SPNN is as follows: 205 | | full connection layer -> activate function 206 | 207 | Parameters 208 | ---------- 209 | STNN_insize: int 210 | input size of STNN(must be positive) 211 | STNN_outsize: int 212 | Output size of STNN(must be positive) 213 | SPNN_insize: int 214 | input size of SPNN(must be positive) 215 | SPNN_outsize: int 216 | Output size of SPNN(must be positive) 217 | activate_func: torch.nn.functional 218 | activate function(default: ``nn.ReLU()``) 219 | 220 | """ 221 | def __init__(self, STNN_insize:int, STNN_outsize, SPNN_insize:int, SPNN_outsize, activate_func=nn.ReLU()): 222 | 223 | super(STNN_SPNN, self).__init__() 224 | self.STNN_insize = STNN_insize 225 | self.STNN_outsize = STNN_outsize 226 | self.SPNN_insize = SPNN_insize 227 | self.SPNN_outsize = SPNN_outsize 228 | self.activate_func = activate_func 229 | self.STNN = nn.Sequential(nn.Linear(self.STNN_insize, self.STNN_outsize), self.activate_func) 230 | self.SPNN = nn.Sequential(nn.Linear(self.SPNN_insize, self.SPNN_outsize), self.activate_func) 231 | 232 | def forward(self, input1): 233 | STNN_input = input1[:, :, self.SPNN_insize:] 234 | SPNN_input = input1[:, :, 0:self.SPNN_insize] 235 | STNN_output = self.STNN(STNN_input) 236 | SPNN_output = self.SPNN(SPNN_input) 237 | output = torch.cat((STNN_output, SPNN_output), dim=-1) 238 | return output -------------------------------------------------------------------------------- /src/gnnwr/utils.py: -------------------------------------------------------------------------------- 1 | import math 2 | import statsmodels.api as sm 3 | import pandas as pd 4 | import torch 5 | import warnings 6 | import folium 7 | from folium.plugins import HeatMap 8 | import branca 9 | 10 | 11 | class OLS: 12 | """ 13 | `OLS` is the class to calculate the OLR coefficients of data.Get the coefficient by `object.params`. 14 | 15 | :param dataset: Input data 16 | :param xName: the independent variables' column 17 | :param yName: the dependent variable's column 18 | """ 19 | 20 | def __init__(self, dataset, xName: list, yName: list): 21 | self.__dataset = dataset 22 | self.__xName = xName 23 | self.__yName = yName 24 | self.__formula = yName[0] + '~' + '+'.join(xName) 25 | self.__fit = sm.formula.ols(self.__formula, dataset).fit() 26 | self.params = list(self.__fit.params.to_dict().values()) 27 | intercept = self.__fit.params.iloc[0] 28 | self.params = self.params[1:] 29 | self.params.append(intercept) 30 | 31 | 32 | class DIAGNOSIS: 33 | """ 34 | `DIAGNOSIS` is the class to calculate the diagnoses of the result of GNNWR/GTNNWR. 35 | These diagnoses include F1-test, F2-test, F3-test, AIC, AICc, R2, Adjust_R2, RMSE (Root Mean Square Error). 36 | The explanation of these diagnoses can be found in the paper 37 | `Geographically neural network weighted regression for the accurate estimation of spatial non-stationarity `. 38 | :param weight: output of the neural network 39 | :param x_data: the independent variables 40 | :param y_data: the dependent variables 41 | :param y_pred: output of the GNNWR/GTNNWR 42 | """ 43 | 44 | def __init__(self, weight, x_data, y_data, y_pred): 45 | self._device = torch.device('cuda') if weight.is_cuda else torch.device('cpu') 46 | 47 | self.__weight = weight.clone() 48 | self.__x_data = x_data.clone() 49 | self.__y_data = y_data.clone() 50 | self.__y_pred = y_pred.clone() 51 | 52 | self.__n = len(self.__y_data) 53 | self.__k = len(self.__x_data[0]) 54 | 55 | self.__residual = self.__y_data - self.__y_pred 56 | self.__ssr = torch.sum((self.__y_pred - self.__y_data) ** 2) # sum of squared residuals 57 | 58 | self.__hat_com = torch.mm(torch.linalg.inv( 59 | torch.mm(self.__x_data.transpose(-2, -1), self.__x_data)), self.__x_data.transpose(-2, -1)) 60 | self.__ols_hat = torch.mm(self.__x_data, self.__hat_com) 61 | x_data_tile = self.__x_data.repeat(self.__n, 1) 62 | x_data_tile = x_data_tile.view(self.__n, self.__n, -1) 63 | x_data_tile_t = x_data_tile.transpose(1, 2) 64 | gtweight_3d = torch.diag_embed(self.__weight) 65 | 66 | hatS_temp = torch.matmul(gtweight_3d, 67 | torch.matmul(torch.inverse(torch.matmul(x_data_tile_t, x_data_tile)), x_data_tile_t)) 68 | self.__hat_temp = hatS_temp 69 | hatS = torch.matmul(self.__x_data.view(-1, 1, self.__x_data.size(1)), hatS_temp) 70 | hatS = hatS.view(-1, self.__n) 71 | self.__hat = hatS 72 | self.__S = torch.trace(self.__hat) 73 | self.f3_dict = None 74 | self.f3_dict_2 = None 75 | 76 | self._eye_I = torch.eye(self.__n, device=self._device) 77 | self._ones_J = torch.ones(self.__n, device=self._device) 78 | def hat(self): 79 | """ 80 | :return: hat matrix 81 | """ 82 | return self.__hat 83 | 84 | def F1_Global(self): 85 | """ 86 | :return: F1-test 87 | """ 88 | k1 = self.__n - 2 * torch.trace(self.__hat) + \ 89 | torch.trace(torch.mm(self.__hat.transpose(-2, -1), self.__hat)) 90 | 91 | k2 = self.__n - self.__k - 1 92 | rss_olr = torch.sum( 93 | (self.__y_data - torch.mm(self.__ols_hat, self.__y_data)) ** 2) 94 | F_value = self.__ssr / k1 / (rss_olr / k2) 95 | # p_value = f.sf(F_value, k1, k2) 96 | return F_value 97 | 98 | def F2_Global(self): 99 | """ 100 | :return: F2-test 101 | """ 102 | # A = (I - H) - (I - S)^T*(I - S) 103 | A = (self._eye_I - self.__ols_hat) - torch.mm( 104 | (self._eye_I - self.__hat).transpose(-2, -1), 105 | (self._eye_I - self.__hat)) 106 | v1 = torch.trace(A) 107 | # DSS = y^T*A*y 108 | DSS = torch.mm(self.__y_data.transpose(-2, -1), torch.mm(A, self.__y_data)) 109 | k2 = self.__n - self.__k - 1 110 | rss_olr = torch.sum( 111 | (torch.mean(self.__y_data) - torch.mm(self.__ols_hat, self.__y_data)) ** 2) 112 | 113 | return DSS / v1 / (rss_olr / k2) 114 | 115 | def F3_Local(self): 116 | """ 117 | :return: F3-test of each variable 118 | """ 119 | 120 | ek_dict = {} 121 | self.f3_dict = {} 122 | self.f3_dict_2 = {} 123 | for i in range(self.__x_data.size(1)): 124 | ek_zeros = torch.zeros([self.__x_data.size(1)],device=self._device) 125 | ek_zeros[i] = 1 126 | ek_dict['ek' + str(i)] = torch.reshape(torch.reshape(torch.tile(ek_zeros.clone().detach(), [self.__n]), 127 | [self.__n, -1]), 128 | [-1, 1, self.__x_data.size(1)]) 129 | hatB = torch.matmul(ek_dict['ek' + str(i)], self.__hat_temp) 130 | hatB = torch.reshape(hatB, [-1, self.__n]) 131 | 132 | L = torch.matmul(hatB.transpose(-2, -1), torch.matmul(self._eye_I - self._ones_J, hatB)) 133 | 134 | vk2 = 1 / self.__n * torch.matmul(self.__y_data.transpose(-2, -1), torch.matmul(L, self.__y_data)) 135 | trace_L = torch.trace(1 / self.__n * L) 136 | f3 = torch.squeeze(vk2 / trace_L / (self.__ssr / self.__n)) 137 | self.f3_dict['f3_param_' + str(i)] = f3 138 | 139 | bk = torch.matmul(hatB, self.__y_data) 140 | vk2_2 = 1 / self.__n * torch.sum((bk - torch.mean(bk)) ** 2) 141 | f3_2 = torch.squeeze(vk2_2 / trace_L / (self.__ssr / self.__n)) 142 | self.f3_dict_2['f3_param_' + str(i)] = f3_2 143 | return self.f3_dict, self.f3_dict_2 144 | 145 | def AIC(self): 146 | """ 147 | :return: AIC 148 | """ 149 | return self.__n * (math.log(self.__ssr / self.__n * 2 * math.pi, math.e)) + self.__n + self.__S 150 | 151 | def AICc(self): 152 | """ 153 | 154 | :return: AICc 155 | """ 156 | return self.__n * (math.log(self.__ssr / self.__n * 2 * math.pi, math.e) + (self.__n + self.__S) / ( 157 | self.__n - self.__S - 2)) 158 | 159 | def R2(self): 160 | """ 161 | 162 | :return: R2 of the result 163 | """ 164 | return 1 - torch.sum(self.__residual ** 2) / torch.sum((self.__y_data - torch.mean(self.__y_data)) ** 2) 165 | 166 | def Adjust_R2(self): 167 | """ 168 | 169 | :return: Adjust R2 of the result 170 | """ 171 | return 1 - (1 - self.R2()) * (self.__n - 1) / (self.__n - self.__k - 1) 172 | 173 | def RMSE(self): 174 | """ 175 | 176 | :return: RMSE of the result 177 | """ 178 | return torch.sqrt(torch.sum(self.__residual ** 2) / self.__n) 179 | 180 | 181 | class Visualize: 182 | """ 183 | `Visualize` is the class to visualize the data and the result of GNNWR/GTNNWR. 184 | It based on the `folium` package and use GaoDe map as the background. And it can display the dataset, the coefficients heatmap, and the dot map, 185 | which helps to understand the spatial distribution of the data and the result of GNNWR/GTNNWR better. 186 | 187 | :param data: the input data 188 | :param lon_lat_columns: the columns of longitude and latitude 189 | :param zoom: the zoom of the map 190 | """ 191 | def __init__(self, data, lon_lat_columns=None, zoom=4): 192 | self.__raw_data = data 193 | self.__tiles = 'https://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=en&size=1&scl=1&style=7' 194 | self.__zoom = zoom 195 | if hasattr(self.__raw_data, '_use_gpu'): 196 | self._train_dataset = self.__raw_data._train_dataset.dataframe 197 | self._valid_dataset = self.__raw_data._valid_dataset.dataframe 198 | self._test_dataset = self.__raw_data._test_dataset.dataframe 199 | self._result_data = self.__raw_data.result_data 200 | self._all_data = pd.concat([self._train_dataset, self._valid_dataset, self._test_dataset]) 201 | if lon_lat_columns is None: 202 | warnings.warn("lon_lat columns are not given. Using the spatial columns in dataset") 203 | self._spatial_column = self._train_dataset.spatial_column 204 | self.__center_lon = self._all_data[self._spatial_column[0]].mean() 205 | self.__center_lat = self._all_data[self._spatial_column[1]].mean() 206 | self.__lon_column = self._spatial_column[0] 207 | self.__lat_column = self._spatial_column[1] 208 | else: 209 | self._spatial_column = lon_lat_columns 210 | self.__center_lon = self._all_data[self._spatial_column[0]].mean() 211 | self.__center_lat = self._all_data[self._spatial_column[1]].mean() 212 | self.__lon_column = self._spatial_column[0] 213 | self.__lat_column = self._spatial_column[1] 214 | self._x_column = data._train_dataset.x_column 215 | self._y_column = data._train_dataset.y_column 216 | self.__map = folium.Map(location=[self.__center_lat, self.__center_lon], zoom_start=zoom, 217 | tiles=self.__tiles, attr="高德") 218 | else: 219 | raise ValueError("given data is not instance of GNNWR") 220 | 221 | def display_dataset(self, name="all", y_column=None, colors=None, steps=20, vmin=None, vmax=None): 222 | """ 223 | Display the dataset on the map, including the train, valid, test dataset. 224 | 225 | :param name: the name of the dataset, including 'all', 'train', 'valid', 'test' 226 | :param y_column: the column of the displayed variable 227 | :param colors: the list of colors, if not given, the default color is used 228 | :param steps: the steps of the colors 229 | 230 | """ 231 | if colors is None: 232 | colors = [] 233 | if y_column is None: 234 | warnings.warn("y_column is not given. Using the first y_column in dataset") 235 | y_column = self._y_column[0] 236 | if name == 'all': 237 | dst = self._all_data 238 | elif name == 'train': 239 | dst = self._train_dataset 240 | elif name == 'valid': 241 | dst = self._valid_dataset 242 | elif name == 'test': 243 | dst = self._test_dataset 244 | else: 245 | raise ValueError("name is not included in 'all','train','valid','test'") 246 | dst_min = dst[y_column].min() if vmin == None else vmin 247 | dst_max = dst[y_column].max() if vmax == None else vmax 248 | res = folium.Map(location=[self.__center_lat, self.__center_lon], zoom_start=self.__zoom, tiles=self.__tiles, 249 | attr="高德") 250 | if len(colors) <= 0: 251 | colormap = branca.colormap.linear.YlOrRd_09.scale(dst_min, dst_max).to_step(steps) 252 | else: 253 | colormap = branca.colormap.LinearColormap(colors=colors, vmin=dst_min, vmax=dst_max).to_step(steps) 254 | for idx, row in dst.iterrows(): 255 | folium.CircleMarker(location=(row[self.__lat_column], row[self.__lon_column]), radius=7, 256 | color=colormap.rgb_hex_str(row[y_column]), fill=True, fill_opacity=1, 257 | popup=""" 258 | longitude:{} 259 | latitude:{} 260 | {}:{} 261 | """.format(row[self.__lon_column], row[self.__lat_column], y_column, row[y_column]) 262 | ).add_to(res) 263 | res.add_child(colormap) 264 | return res 265 | 266 | def coefs_heatmap(self, data_column, colors=None, steps=20, vmin=None, vmax=None): 267 | """ 268 | Display the heatmap of the coefficients of the result of GNNWR/GTNNWR. 269 | 270 | :param data_column: the column of the displayed variable 271 | :param colors: the list of colors, if not given, the default color is used 272 | :param steps: the steps of the colors 273 | :param vmin: the minimum value of the displayed variable, if not given, the minimum value of the variable is used 274 | :param vmax: the maximum value of the displayed variable, if not given, the maximum value of the variable is used 275 | """ 276 | if colors is None: 277 | colors = [] 278 | res = folium.Map(location=[self.__center_lat, self.__center_lon], zoom_start=self.__zoom, tiles=self.__tiles, 279 | attr="高德") 280 | dst = self._result_data 281 | dst_min = dst[data_column].min() if vmin is None else vmin 282 | dst_max = dst[data_column].max() if vmax is None else vmax 283 | data = [[row[self.__lat_column], row[self.__lon_column], row[data_column]] for index, row in dst.iterrows()] 284 | if len(colors) <= 0: 285 | colormap = branca.colormap.linear.YlOrRd_09.scale(dst_min, dst_max).to_step(steps) 286 | else: 287 | colormap = branca.colormap.LinearColormap(colors=colors, vmin=dst_min, vmax=dst_max).to_step(steps) 288 | gradient_map = dict() 289 | for i in range(steps): 290 | gradient_map[i / steps] = colormap.rgb_hex_str(i / steps) 291 | colormap.add_to(res) 292 | HeatMap(data=data, gradient=gradient_map, radius=10).add_to(res) 293 | return res 294 | 295 | def dot_map(self, data, lon_column, lat_column, y_column, zoom=4, colors=None, steps=20, vmin=None, vmax=None): 296 | """ 297 | Display the data by dot map, the color of the dot represents the value of the variable. 298 | 299 | :param data: the input data 300 | :param lon_column: the column of longitude 301 | :param lat_column: the column of latitude 302 | :param y_column: the column of the displayed variable 303 | :param zoom: the zoom of the map 304 | :param colors: the list of colors, if not given, the default color is used 305 | :param steps: the steps of the colors 306 | :param vmin: the minimum value of the displayed variable, if not given, the minimum value of the variable is used 307 | :param vmax: the maximum value of the displayed variable, if not given, the maximum value of the variable is used 308 | """ 309 | if colors is None: 310 | colors = [] 311 | center_lon = data[lon_column].mean() 312 | center_lat = data[lat_column].mean() 313 | dst_min = data[y_column].min() if vmin is None else vmin 314 | dst_max = data[y_column].max() if vmax is None else vmax 315 | res = folium.Map(location=[center_lat, center_lon], zoom_start=zoom, tiles=self.__tiles, attr="高德") 316 | if len(colors) <= 0: 317 | colormap = branca.colormap.linear.YlOrRd_09.scale(dst_min, dst_max).to_step(steps) 318 | else: 319 | colormap = branca.colormap.LinearColormap(colors=colors, vmin=dst_min, vmax=dst_max).to_step(steps) 320 | for idx, row in data.iterrows(): 321 | folium.CircleMarker(location=(row[lat_column], row[lon_column]), radius=7, 322 | color=colormap.rgb_hex_str(row[y_column]), fill=True, fill_opacity=1, 323 | popup=""" 324 | longitude:{} 325 | latitude:{} 326 | {}:{} 327 | """.format(row[lon_column], row[lat_column], y_column, row[y_column]) 328 | ).add_to(res) 329 | colormap.add_to(res) 330 | return res 331 | --------------------------------------------------------------------------------