language: cn
model_unique_abbr: expectation_maximization_clustering
version: 1.0
identification:
  docker_image_name: expectation_maximization_clustering:1.0
  model_name: EM聚类
  semantic: point clustering
  description: 基于EM实现对空间点进行聚类，将空间点对象无监督地划分为若干具有相似特征的集群。
  category_application: 诊断型
  category_data:
    - 点数据分析
  keywords:
    - 高斯函数
    - 混合模型


parameter_info:
  parameters:
    - arg_name: input
      is_single_en_dash: false
      param_type: input_data
      name: 空间点数据
      description: "待聚类的空间点数据,以csv的形式保存,需要表头，包含x、y坐标"
      data_type: csv
      data_semantic: spatial point data

    - arg_name: x_field
      is_single_en_dash: false
      param_type: param
      name: X坐标字段
      description: X坐标列在输入文件中的列名
      data_type: str
      data_semantic: x_field
      param_switches:
        - switch_arg_name: input
          switch_arg_value_regex: csv$
          switch_arg_value_examples: [big_dataset.csv, small_dataset.csv]
      specification:
        default: x

    - arg_name: y_field
      is_single_en_dash: false
      param_type: param
      name: Y坐标字段
      description: Y坐标列在输入文件中的列名
      data_type: str
      data_semantic: y_field
      param_switches:
        - switch_arg_name: input
          switch_arg_value_regex: csv$
          switch_arg_value_examples: [big_dataset.csv, small_dataset.csv]
      specification:
        default: y

    - arg_name: cluster_num
      is_single_en_dash: false
      param_type: param
      name: 聚类数目
      description: "模型聚类中心的数目，整数型数值，最小值为2"
      data_type: int
      specification:
        default: 2

    - arg_name: epsilon
      is_single_en_dash: false
      param_type: param
      name: 收敛阈值
      description: "模型收敛的阈值，浮点型数值，默认为1e-5"
      data_type: float
      data_semantic: convergence_threshold
      specification:
        default: 0.00005

    - arg_name: max_iter
      is_single_en_dash: false
      param_type: param
      name: 最大迭代次数
      description: "模型算法的最大迭代次数，整数类型，默认为100，建议最大迭代次数不超过10000"
      data_type: int
      data_semantic: maximum_iteration
      specification:
        default: 100

    - arg_name: output
      is_single_en_dash: false
      param_type: output_data
      name: 聚类结果
      description: "带有簇标签的聚类结果，结果保存为csv格式的文件。新增列名默认为label,若原数据中已有该列,则添加从序号1编号,如label1、label2...。聚类标签为1,2..."
      data_type: csv
      data_semantic: cluster_result

  groups:
    - group_id: ixy
      group_name: 输入数据XY列
      group_param_arg_names:
        - input
        - x_field
        - y_field
application:
  domain: 空间点对象聚类
  objective: 适用于各种数据类型和复杂度的聚类
  dimension:
  - 二维
  spatial_resolution:
  spatial_reference:
  mechanism: 通过采用高斯混合模型，反复迭代估计概率分布的参数和数据点的分配
operation:
  usage: 该算法需要五个参数，X坐标列(x field)，Y坐标列(y field)，聚类数目(num_clusters)，收敛阈值(epsilon)，最大迭代次数(max_iter)
  exec_example:
    - docker run -v $(pwd):/data expectation_maximization_clustering:1.0  --input /data/data.csv -x_field x -y_field y -cluster_num 2 --epsilon 1e-5 --max_iter 100 --output output.csv
    - docker run -v $(pwd):/data expectation_maximization_clustering:1.0  --input /data/data.csv -x_field x -y_field y -cluster_num 2 --output output.csv
  output_display:
    - "输出为csv格式，在原文件的基础上，添加一列label列，可以根据labels列进行可视化。"
technique:
  language:
    - Python
  os:
    - Linux
    - Windows
source:
  maintainer: Shiyi Li
  organization: Central South University
  contact: 1749405717@qq.com
  repository:
  integrated_softwares:
    - name: scipy
      version: 1.10.1
      license:
  references:
    - ":McLachlan, G. J., Krishnan, T. 2007. The EM algorithm and extensions. Hoboken, New Jersey: John Wiley & Sons, p369."
