language: cn
model_unique_abbr: gtwrp_R
version: 1.0
identification:
  docker_image_name: gwmodel:2.3
  docker_run_prefix:
  - /scripts/gtwr_predict.r
  model_name: 时空加权回归分析预测模型
  semantic: Spatial prediction
  description: 时空加权回归分析预测模型通过对特定时刻，对空间范围内每个预测点处的线性回归方程进行局部加权求解,通过输入具有自变量观测值样本值的空间数据作为预测点,进行对应空间位置上的因变量值进行预测。
  category_application: 预测型
  category_data:
  - 矢量点
  - 矢量面
  keywords:
  - 空间预测
  - 空间异质性
parameter_info:
  parameters:
  - arg_name: f
    param_type: input_data
    name: 矢量空间数据
    description: 带有属性表的矢量数据,属性表中还要包括有时间变量
    data_type: shp
    data_semantic: vector space data
  - arg_name: d
    param_type: param
    name: 因变量
    description: 建立时空地理加权回归模型时选取的因变量
    data_type: str
    data_semantic: dependent variable
  - arg_name: p
    param_type: input_data
    name: 预测数据
    description: 待预测的矢量数据,不提供则默认对输入的矢量空间数据进行预测
    is_required: false
    data_type: shp
    data_semantic: predicted space data
  - arg_name: i
    param_type: param
    name: 自变量
    description: 建立时空地理加权回归模型时选取的自变量
    data_type: str
    data_semantic: independent variable
  - arg_name: t
    param_type: param
    name: 时间变量
    description: 建立时空地理加权回归模型时参考的时间变量名称
    data_type: str
    data_semantic: timestamps variable
  - arg_name: q
    param_type: param
    name: 时间变量
    description: 预测数据的时间变量名称
    is_required: false
    data_type: str
    data_semantic: timestamps of predict data
    param_switches:
    - switch_arg_name: p
      switch_arg_value_regex: shp$
      switch_arg_value_examples: [a.shp, gtwr-pre.shp]
  - arg_name: l
    param_type: param
    name: lambda值
    description: 衡量时空距离的权重,取0-1之间值,λ代表空间距离的权重,1-λ代表时间距离权重,默认λ=0.05
    is_required: false
    data_type: float
    data_semantic: spatial temporal ratio
    specification:
      default: "0.05"
      range:
      - "[0,1]"
  - arg_name: k
    param_type: param
    name: 核函数
    description: 核函数,根据核函数的距离衰减可以计算权重。枚举类型,核函数可选:gaussian,exponential,bisquare,tricube,boxcar
    is_required: false
    data_type: enum
    data_semantic: kernel function
    specification:
      default: gaussian
      enum:
      - gaussian
      - exponential
      - bisquare
      - tricube
      - boxcar
  - arg_name: e
    param_type: param
    name: 带宽类型
    description: 是否采用自适应带宽(即最近邻居数量),若为false则为固定带宽(计算实际距离),默认为true:采用自适应带宽
    is_required: false
    data_type: bool
    data_semantic: bandwidth type
    specification:
      default: "true"
  - arg_name: s
    param_type: param
    name: 带宽优选
    description: 是否采用自动优选带宽,默认为true:自动优选带宽
    is_required: false
    data_type: bool
    data_semantic: bandwidth optimization
    specification:
      default: "true"
  - arg_name: a
    param_type: param
    name: 带宽优选方法
    description: 带宽优选方法,枚举类型,可选CV,AIC两种方法,当带宽优选为true时生效,默认为CV
    is_required: false
    data_type: enum
    data_semantic: bandwidth optimization method
    param_switches:
    - switch_arg_name: s
      switch_arg_value_regex: "true"
      switch_arg_value_examples: ["true"]
    specification:
      default: CV
      enum:
      - CV
      - AIC
  - arg_name: b
    param_type: param
    name: 带宽大小
    description: 带宽大小,当带宽类型参数为true代表最近邻居数量,带宽为false时代表实际时空距离。当带宽优选参数为false时生效,需要输入具体的带宽值
    is_required: false
    data_type: float
    data_semantic: bandwidth size
    param_switches:
    - switch_arg_name: s
      switch_arg_value_regex: "false"
      switch_arg_value_examples: ["false"]
  - arg_name: r
    param_type: output_data
    name: 结果空间数据
    description: 将计算结果以空间数据的形式输出。要素与源数据的要素相同,属性表包括因变量预测值
    data_type: shp
    data_semantic: result spatial data
  - arg_name: h
    param_type: output_data
    name: 模型诊断信息
    description: 诊断信息输出:回归计算时间,回归方程,参与计算的模型点数量,包括全局回归和时空地理加权回归的全局R2值、调整R2值、AIC值和AICc值等
    data_type: txt
    data_semantic: model diagnostic information
application:
  domain: 考虑空间异质性特征的指定时间的空间变量预测。
  objective: 通过时空地理加权回归分析模型和样本空间数据进行对应时刻的空间位置上的因变量值预测,可用于多元变量背景下的时空变量预测。
  link_models:
    preorder: []
    alternative: []
  dimension:
  - 二维
  timestep: []
  spatial_resolution: []
  spatial_reference: []
  mechanism: 利用时空地理加权回归分析模型在预测点位置进行求解,通过具有自变量观测值的样本与对应位置的参数估计进行变量预测。
operation:
  usage: 模型参数包括必选参数输入数据、因变量、自变量、时间变量、输出数据,可选参数lambda值、核函数、带宽类型、带宽优选,选择带宽优选后可指定带宽优选方法,若不选择带宽优选则需指定带宽大小。
  exec_example:
  - docker run -v $PWD/gtwr-pred:/data gwmodel:2.3 /scripts/gtwr_predict.r -f /data/gtwr-example.shp -p /data/gtwr-pre.shp -d y -i x1,x2,x3 -t t -l 0.1 -k "bisquare" -e true -b 30 -r result.shp -h result.txt
  output_display:
  - 展示预测结果的分层设色图
  - 展示模型诊断信息txt
  license:
  - GPL-2
  - GPL-3
technique:
  language:
  - R
  - C++
  os:
  - Linux
  - Windows
  parallel: []
  hardware: []
  dependencies:
  - name: GWmodel
    version: 2.2-9
source:
  maintainer: Guangyu Ou
  organization: Wuhan University
  contact: g_ruoyu@qq.com
  repository: https://github.com/GWmodel-Lab
  integrated_softwares:
  - name: GWmodel
    version: 2.2-9
    license: GPL-2
  references:
  - "Binbin Lu, Paul Harris, Martin Charlton & Chris Brunsdon (2014) The GWmodel R package: further topics for exploring spatial heterogeneity using geographically weighted models, Geo-spatial Information Science, 17:2, 85-101, DOI: 10.1080/10095020.2014.917453"
  - "Huang, B., Wu, B., Barry, M. 2010. Geographically and temporally weighted regression for modeling spatio-temporal variation in house prices. International Journal of Geographical Information Science, 24(3): 383–401."
