Skip to content

metricshilab/Beijing-housing-prediction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unfolding Beijing in a Hedonic Way

This is a public repository accompanying the paper

for access of the data and R scripts. Please contact Yishu Wang ([email protected]) if you have any questions about the code.

Code structure

Data:

  • lianjia.RData: Transaction-level dataset of housing prices in Beijing from Lianjia.

Master Files:

  • prediction.R: Main file for performing spatial prediction in Section 3.
  • pred_seq.R: Main file for performing sequential forecast in Section 4.

KNN Tuning:

  • KNN/plm.knn.R: Functions of partial linear k-Nearest Neighbor (KNN)
  • KNN/SKNN.Tune.R: Tuning spatial KNN
  • KNN/STKNN.Tune.R: Tuning spatial-temporal KNN
  • KNN/SKNN_seq.Tune.R: Tuning sequential spatial KNN

NW Tuning:

  • NW/plm.NW.R: Functions of partial linear Nadaraya-Watson (NW)
  • NW/SNW.Tune.R: Tuning spatial NW
  • NW/STNW.Tune.R: Tuning spatial-temporal NW
  • NW/SNW_seq.Tune.R: Tuning sequential spatial NW

LPN Tuning:

  • LPN/plm.localpoly.pred: Functions of partial linear Local Polynomial (LPN)
  • LPN/SLPN.Tune.R: Tuning spatial LPN
  • LPN/STLPN.Tune.R: Tuning spatial-temporal LPN
  • LPN/SLPN_seq.Tune.R: Tuning sequential spatial LPN

RF Tuning:

  • RF/RF.Tune.R: Tuning Random Forests (RF, spatial version)
  • RF/RF_seq.Tune.R: Tuning Random Forests (RF, sequential version)

GBM Tuning:

  • GBM/GBM.Tune.R: Tuning Gradient Boosting Machine (GBM, spatial version)
  • GBM/GBM_seq.Tune.R: Tuning Gradient Boosting Machine (GBM, sequential version)

Visualization:

  • GBMplot.R: Plotting Figure 3 "GBM prediction on coordinate raster"

Remark: If you want to save time from tuning parameters and trust our tuning results, you can directly run prediction.R and pred_seq.R to replicate our main results.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%