-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ziqi
authored and
Ziqi
committed
Mar 16, 2021
0 parents
commit ab79cfd
Showing
20 changed files
with
209,509 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
551 changes: 551 additions & 0 deletions
551
.ipynb_checkpoints/Results Validation against mgwr-checkpoint.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
|
||
# FastGWR | ||
A command line tool for fast parallel computation of Geographically Weighted Regression models. | ||
|
||
|
||
### Installation: | ||
|
||
1. Install any MPI implementation | ||
For Mac: | ||
|
||
OpenMPI: https://www.open-mpi.org | ||
|
||
or `conda install openmpi` | ||
|
||
For PC: | ||
|
||
Microsoft MPI: https://docs.microsoft.com/en-us/message-passing interface/microsoft-mpi | ||
|
||
or `conda install mpich` | ||
|
||
|
||
Make sure you have the mpi command on your path by running | ||
`mpiexec` | ||
|
||
|
||
|
||
2. Install mpi4py | ||
|
||
`conda install mpi4py` | ||
|
||
|
||
3. Install fastgwr | ||
|
||
`pip install fastgwr` | ||
|
||
|
||
### Example | ||
Example call to FastGWR which can be called on desktop or HPC: | ||
``` | ||
fastgwr run -np 4 -data input.csv -out results.csv -adaptive | ||
``` | ||
``` | ||
where: | ||
-np 4: using 4 processors. | ||
-data input.csv: input data matrix. | ||
-out results.csv: output GWR results matrix including local parameter estimates, standard errors and local diagnostics. | ||
-adaptive: Adaptive Bisquare kernel. | ||
-fixed: Fixed Gaussian kernel. | ||
-constant: Adding a constant column vector of 1 to the design matrix. | ||
-bw 1000: Pre-defined bandwidth parameter. If missing, it will (golden-section) search for the optimal bandwidth and use that to fit GWR model. | ||
-minbw 45: Lower bound in golden-section search. | ||
``` | ||
|
||
The input needs to be prepared in this order: | ||
|
||
| X-coord | Y-coord | y | X1 | X2 | ...| Xk | | ||
|
||
|:-------:|:-------:|:-:|:--:|:--:|:--:|:--:| | ||
|
||
``` | ||
where: | ||
X-coord: X coordinate of the location point | ||
Y-coord: Y coordinate of the location point | ||
y: dependent variable | ||
X1...Xk: independent variables | ||
``` | ||
|
||
### Citation | ||
|
||
[FastGWR](https://www.tandfonline.com/doi/full/10.1080/13658816.2018.1521523) | ||
|
||
Li,Z., Fotheringham,A.S., Li,W., Oshan,T. (2019) Fast Geographically Weighted Regression (FastGWR): A Scalable Algorithm to Investigate Spatial Process Heterogeneity in Millions of Observations. International Journal of Geographic Information Science. doi: 10.1080/13658816.2018.1521523 |
Oops, something went wrong.