language: cn
model_unique_abbr: Flow_Kmeans
version: 1.0.0
identification:
  docker_image_name: spark-geoflow:2.0
  model_name: 地理流的Kmeans聚类
  description: 该方法读取流数据,使用Kmeans方法对流进行聚类。
  category_application: 诊断型
  category_data:
    - 流数据分析
  keywords:
    - 地理流
    - Kmeans
    - 聚类

parameter_info:
  parameters:
    - arg_name: ' '
      is_positional_arg: true
      param_type: param
      visible: false
      name: 算法名称
      description: 算法的名称或者是一个特定的操作指令
      is_required: false
      data_type: str
      specification:
        default: flow-kmeans
    - arg_name: od
      is_positional_arg: true
      param_type: input_data
      name: 流数据文件
      description: CSV格式地理流数据
      data_type: csv
      data_semantic: od_flow
    - arg_name: odcluster
      is_positional_arg: true
      param_type: output_data
      name: 流聚类结果存储路径
      description: 算法的结果将会保存在此输出文件夹中
      data_type: str
      data_semantic: od_cluster   
    - arg_name: id_index
      is_positional_arg: true
      param_type: param
      name: 索引
      description: 流编号所在的列数
      data_type: int
      data_semantic: id_index
      specification:
        range:
        - "[0,)"
    - arg_name: oLon_index
      is_positional_arg: true
      param_type: param
      name: 索引
      description: 起点的经度所在列数
      data_type: int
      data_semantic: origin_lon_index
      specification:
        range:
        - "[0,)"
    - arg_name: oLat_index
      is_positional_arg: true
      param_type: param
      name: 索引
      description: 起点的纬度所在列数
      data_type: int
      data_semantic: origin_lat_index
      specification:
        range:
        - "[0,)"
    - arg_name: dLon_index
      is_positional_arg: true
      param_type: param
      name: 索引
      description: 终点的经度所在列数
      data_type: int
      data_semantic: destination_lon_index
      specification:
        range:
        - "[0,)"
    - arg_name: dLat_index
      is_positional_arg: true
      param_type: param
      name: 索引
      description: 终点的纬度所在列数
      data_type: int
      data_semantic: destination_lat_index
      specification:
        range:
        - "[0,)"
    - arg_name: k
      is_positional_arg: true
      param_type: param
      name: K值
      description: Kmeans聚类数目
      data_type: int
      data_semantic: cluster_num
      specification:
        range:
        - "(0,)"

application:
  domain: 地理流分析
  objective: 该方法使用Kmeans方法对地理流数据进行聚类。
  link_models:
    preorder: []


operation:
  usage: 使用方法描述
  exec_example:
    - docker run -u 0 $(pwd)/data:/geoflow/data crazy-zlj:spark-geoflow:2.0 flow-idw /data/od_flows.csv /data/gravity_res /data/district_pop_wuhan.csv 1 0,1 0,1,2,3
  output_display:
    - csv文件

technique:
  language: [scala]
  os: [windows, linux]

source:
  maintainer: Xingchen Fan
  organization: "Institute of Geographic Sciences & Natural Resources Research, Chinese Academy of Sciences"
  contact: fanxc@lreis.ac.cn
  references:
    - 参考文献1
