language: cn
model_unique_abbr: SVM_sklearn
version: 1.0
identification:
  docker_image_name: svm:1.0.0-sklearn1.0.2
  model_name: 支持向量机（点数据-CSV）
  semantic: support vector machine
  description: 一类对数据进行二元分类的含核函数的广义线性分类器，其决策边界是对学习样本求解的最大分类超平面，通过多类泛化推广为多类分类器。
  category_application: 预测型
  category_data:
  - 结构化事务数据
  keywords:
  - 监督学习
  - 广义线性分类器
parameter_info:
  parameters:
  - arg_name: train_data
    param_type: input_data
    name: 训练数据
    description: 训练数据
    data_type: csv
    data_semantic: train data

  - arg_name: train_label
    param_type: input_data
    name: 训练标签
    description: 训练标签
    data_type: csv
    data_semantic: train label

  - arg_name: test_data
    param_type: input_data
    name: 测试数据
    description: 测试数据
    data_type: csv
    data_semantic: test data

  - arg_name: test_label
    param_type: input_data
    name: 测试标签
    description: 测试标签
    data_type: csv
    data_semantic: test label

  - arg_name: C
    param_type: param
    name: 正则化参数
    description: 正则化的强度与 C 成反比。必须严格为正。 罚分是平方 l2 罚分。取值范围(0,]，默认值为1.0
    is_required: false
    data_type: float
    data_semantic: C
    specification:
      default: 1.0
      range:
      - "(0,]"

  - arg_name: k
    param_type: param
    name: 内核类型
    description: 指定要在算法中使用的内核类型。
    is_required: false
    data_type: enum
    data_semantic: kernel
    specification:
      default: rbf
      enum:
      - linear
      - poly
      - rbf
      - sigmoid
      - precomputed

  - arg_name: d
    param_type: param
    name: 多项式核函数的次数
    description: 多项式核函数的度数("poly").被所有其他内核忽略。取值范围为[0,]，默认值为3
    is_required: false
    data_type: int
    data_semantic: degree
    specification:
      default: 3
      range:
      - "[0,]"

  - arg_name: g
    param_type: param
    name: 伽玛
    description: rbf、poly和sigmoid的核系数
    is_required: false
    data_type: enum
    data_semantic: gamma
    specification:
      default: scale
      enum:
      - scale
      - auto

  - arg_name: c
    param_type: param
    name: 系数0
    description: 核函数中的独立项。 它仅在"poly"和"sigmoid"中有意义。取值范围为[0.0,]，默认值为0.0
    is_required: false
    data_type: float
    data_semantic: tol0
    specification:
      default: 0.0
      range:
      - "[0.0,]"

  - arg_name: t
    param_type: param
    name: 公差
    description: 停止标准的公差，取值范围为(0,1)，默认值为0.001
    is_required: false
    data_type: float
    data_semantic: tol
    specification:
      default: 0.001
      range:
      - (0,1)

  - arg_name: cache_size
    param_type: param
    name: 缓存大小
    description: 指定内核缓存的大小（以MB为单位），取值范围为(0,)，默认值为200.0
    is_required: false
    data_type: float
    data_semantic: cache size
    specification:
      default: 200.0
      range:
      - (0,)

  - arg_name: decision_function_shape
    param_type: param
    name: 决策函数形状
    description: 决定返回形状的函数
    is_required: false
    data_type: str
    data_semantic: decision function shape
    specification:
      default: ovr


  - arg_name: output
    param_type: output_data
    name: 输出数据
    description: 输出数据，文件格式为csv
    data_type: csv
    data_semantic: output data

  groups:
  - group_id: poly_and_degree
    group_name: 聚和度
    group_param_arg_names:
    - k
    - d


application:
  domain: 结构化事务数据分类
  objective: 根据先验信息对待预测数据进行分类型预测
  mechanism: 求解能够正确划分训练数据集并且在特征空间中几何间隔最大的分离超平面
operation:
  usage: 在命令行中用代码指定正则化参数，内核类型，输入训练数据，输入训练标签，输入预测数据，输入预测标签，输出预测结果，完成算法运行
  exec_example:
  - docker run -v $(pwd):/data svm:1.0.0-sklearn1.0.2 -C 1.0 -kernel rbf -train_data /data/train_data.csv -train_label /data/train_label.csv -test_data /data/-test_data.csv - test_label/data/test_label.csv -output result.csv
  output_display:
  - 针对预测结果，将预测结果通过二维坐标轴进行点位的坐标展示。
  license:
  - BSD-3-Clause
  - PSF-2.0
  - GPL-2.0
technique:
  language:
  - Python
  os:
  - windows
  - linux
  parallel:
  - multithreading
  hardware:
  - cpu
  dependencies:
  - name: scikit-learn
    version: 1.0.2
  - name: pandas
    version: 1.1.3
  - name: numpy
    version: 1.19.2
source:
  maintainer: Tianming Zhao
  organization: Beijing University of Civil Engineering and Architecture
  contact: 2108570020097@stu.bucea.edu.cn
  references:
  - Cortes, C., Vapnik, V. 1995. Support-vector networks. Machine learning, 20(3):273–297.
  - https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html
