language: cn
model_unique_abbr: GWR_R
version: 1.0
identification:
  docker_image_name: gwmodel:2.3
  docker_run_prefix:
  - /scripts/gwr.r
  model_name: 地理加权回归
  semantic: standard gwr
  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: i
    param_type: param
    name: 自变量
    description: 建立地理加权回归模型时选取的自变量,可以通过变量优选获得
    data_type: str
    data_semantic: independent variable, result of variable selection
  - 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: t
    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"]
    specification:
      default: 20
      range:
      - "[0,)"
  - arg_name: r
    param_type: output_data
    name: 结果空间数据
    description: 将计算结果以空间数据的形式输出。shp格式,属性表包括:各个自变量对应的回归系数,因变量真实值,因变量预测值,残差,局部R2值,各个自变量对应回归系数等
    data_type: shp
    data_semantic: result spatial data
  - arg_name: h
    param_type: output_data
    name: 模型诊断信息
    description: 诊断信息输出:回归计算时间,回归方程,全局R2值, AIC值和AICc值,txt格式
    data_type: txt
    data_semantic: model diagnostic information
  groups:
  - group_id: bw
    group_name: 带宽优选参数
    group_param_arg_names:
    - s
    - a
  - group_id: bwc
    group_name: 固定带宽参数
    group_param_arg_names:
    - s
    - b
application:
  domain: 局部尺度下的空间回归分析
  objective: 通过关于位置的局部加权回归分析模型求解，以随着空间位置不同而变化的参数估计结果，量化反映空间数据关系中的异质性或非平稳性特征
  link_models:
    preorder: []
    alternative: []
  dimension:
  - 二维
  timestep: []
  spatial_resolution: []
  spatial_reference: []
  mechanism: 在研究区域中抽样回归分析点，针对每个位置分别采用加权线性最小二乘方法进行回归模型解算，得到与空间位置一一对应的空间回归系数，量化反映研究区域内多元变量关系的空间异质性特征。
operation:
  usage: 模型参数包括必选参数输入数据、因变量、自变量、输出数据，可选参数核函数、带宽类型、带宽优选，选择带宽优选后可指定带宽优选方法，若不选择带宽优选则需指定带宽大小。
  exec_example:
  - "docker run -v $PWD/data:/data gwmodel:2.2 /scripts/gwr.r -f /data/gwr-example.shp -d y -i x1,x2,x3 -k \"bisquare\" -t true -s true -a CV  -r result.shp -h result.txt"
  output_display:
  - 制作自变量系数的分层设色图
  - 展示模型诊断信息txt
  license:
  - GPL-2
  - GPL-3
technique:
  language:
  - R
  - C++
  os:
  - Linux
  - Windows
  parallel:
  - OpenMP
  hardware: []
  dependencies:
  - name: GWmodel
    version: 2.2-9
source:
  maintainer: Tianyang Xia
  organization: Wuhan University
  contact: 229857471@qq.com
  repository: https://github.com/GWmodel-Lab
  integrated_softwares:
  - name: GWmodel
    version: 2.2-9
    license: GPL-2
  references:
  - "Lu, B., Charlton, M., Harris, P., et al. 2014. Geographically weighted regression with a non-Euclidean distance metric':' A case study using hedonic house price data. International Journal of Geographical Information Science, 28(4)':'660–681. doi：10.1080/13658816.2013.865739"
