# 奇异值分解 =========================== 缺前端控件截图 ## 功能说明 奇异值分解(Singular Value Decomposition)是线性代数中一种重要的矩阵分解,奇异值分解则是特征分解在任意矩阵上的推广。 ## 参数说明 | 参数名称 | 参数取值范围 | 默认值 | 参数描述 | | ------ | :----: | :----: | ------ | | 特征维度 | 整型 | 1 | 约简后的特征维度,默认值为1 | | 精度误差 | 浮点数 | 0.01 | 精度误差,默认为0.01 | | 字段集合 | 字符串 | "" | 选择需要计算的列,如果不选则默认转换全部字段 | ## 算法定义 .. image:: uploads/3173b1c89cc6962abe0d52b76d215f41/图片14.png ## 奇异值求解 .. image:: uploads/63d41ebfd9a51bdde738f294cc5819e5/图片15.png :download:`参考JSON` ## 参数 | 名称 | 类型 | 是否必传 | 备注 | | -------- | ----- | ---- | ------| | inputarg | array | Y | 字段集合 | | inputarg.#.tbname1 | string | Y | 表名 | | inputarg.#.k | int | Y | 约简后的特征维度 | | inputarg.#.tol | double | Y | 精度误差 | | inputarg.#.columnArray | array | Y | 字段名称集合 | ## 返回 | 名称 | 类型 | 是否必传 | 备注 | | -------- | ----- | ---- | ------| | result | String | Y | 所有输出的JSON,按节点类型解析 | ## 算法入口及参数 | 名称 | 示例 | 备注 | | -------- | ---- | ------| | args[0] | tmptb2019062511473300088201 | 输入表名 | | args[1] | sepal_length,sepal_width,petal_length,petal_width | 字段集合 | | args[2] | 3 | 约简后的特征维度 | | args[3] | tmptb2019062605545200088301 | 左奇异矩阵名称名称 | | args[4] | hdfs://namenode:9000/ispatial/sysfile/tmps2019062605545200088301 | 奇异值存储地址 | | args[5] | hdfs://namenode:9000/ispatial/sysfile/tmpv2019062605545200088301 | 右奇异矩阵存储地址 | | args[6] | 0.000001 | 精度误差 | # 配置模版:奇异值分解 SVD --------------------------------------------- #### type: 301 .. code:: { "label": "SVD", "name": "SVD", "params": { "input_nodes": [ { "key": "tbname1", "desc": "输入数据表", "type": "table" } ], "input_form": [ { "key": "columnArray", "label": "数据字段", "placeholder": "请选择数据字段", "type": "select", "options": "getTableColumns", "onChange": "", "multiple": true }, { "key": "tol", "label": "精度误差", "placeholder": "请输入精度误差", "default": "0.000001", "type": "input" }, { "key": "k", "label": "约简后的特征维度", "placeholder": "请输入特征维度数量", "default": "", "type": "input" } ], "output_nodes": [ { "key": "output1", "desc": "左奇异矩阵", "type": "table" }, { "key": "output2", "desc": "奇异值", "type": "address" }, { "key": "output3", "desc": "右奇异矩阵", "type": "address" } ] } }