市财政收入分析预测.json 41 KB

1
  1. {"style":{"width":100,"height":120,"isMini":false,"curHeight":845,"curWidth":1435},"nodes":[{"outputs":[{"access":"SAME","left":90,"columns":"[]","cat":"DATA","description":"输出","model":false,"id":"10000010_0_1","type":"OUTPUT","value":"168","key":"output","canPreview":true}],"outputData":[{"key":"database","dataFields":[{"dataType":"numeric","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","name":"y","index":13,"otherParam":0}]}],"inputData":[],"inputs":[],"tabs":[{"tabName":"字段属性","createTime":1559802249156,"elements":[{"visible":true,"defaultValue":"","toolTip":"输入数据源的表名","label":"数据表","required":false,"sequence":1,"createTime":1559802249156,"extra":{"tableName":"168","tableItems":[{"name":"financial_data","id":"168"}]},"name":"table","options":"","id":30010,"placeholder":"","value":"168","elementType":0,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"","label":"字段信息","required":false,"sequence":2,"createTime":1559802249156,"extra":{"columnsItems":[{"dataType":"numeric","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","name":"y","index":13,"otherParam":0}]},"name":"columns","options":"","id":30009,"placeholder":"","value":"","elementType":13,"rexp":""}],"id":11922}],"description":"输入源:读取表数据组件。当输入表名后,会自动读取表的结构数据,在字段信息中可查看当数据源是来来源于数据库时,表字段修改后,如增加或删除某个字段,在平台是无法感知的,需要用户重新设置一下数据源,数据同步一下这个表信息.","serverId":797,"outputExtraData":[],"hasReport":false,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.io.Input","top":5,"engine":"PYTHON","left":310,"allowViewSource":false,"name":"输入源","runStyle":"status-sus","id":"10000010","iconPath":" fa-exchange","minimumInput":0,"lastUpdateTime":1560395875686},{"outputs":[{"access":"SAME","left":90,"columns":"[]","cat":"DATA","description":"相关性分析结果","model":false,"id":"10000011_0_1","type":"OUTPUT","value":"10000011_0_1","key":"data_out","canPreview":true}],"outputData":[{"key":"data_in","dataFields":[]}],"inputData":[{"key":"data_in","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","values":"","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":13,"otherParam":0}]}],"inputs":[{"left":90,"cat":"DATA","isConnected":true,"description":"数据","model":false,"id":"10000011_1_1","type":"INPUT","value":"10000011_1_1","key":"data_in","canPreview":false}],"tabs":[{"tabName":"字段属性","createTime":1559175040947,"elements":[{"visible":true,"defaultValue":"","toolTip":"整体数据情况","label":"数据","required":false,"sequence":1,"createTime":1559175040948,"extra":{"key":"data_in","colItems":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","values":"","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":13,"otherParam":0}]},"name":"col","options":"","id":29184,"placeholder":"","value":"","elementType":13,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"进行操作的所有列。请选择数值型数据,如果勾选了非数值类型数据,则会自动过滤,下个组件可能无法获取所有列。","label":"特征","required":false,"sequence":2,"createTime":1559175040947,"extra":{"columnsItems":[{"label":"x1","value":"x1"},{"label":"x2","value":"x2"},{"label":"x3","value":"x3"},{"label":"x4","value":"x4"},{"label":"x5","value":"x5"},{"label":"x6","value":"x6"},{"label":"x7","value":"x7"},{"label":"x8","value":"x8"},{"label":"x9","value":"x9"},{"label":"x10","value":"x10"},{"label":"x11","value":"x11"},{"label":"x12","value":"x12"},{"label":"x13","value":"x13"},{"label":"y","value":"y"}],"key":"data_in"},"name":"columns","options":"","id":29183,"placeholder":"","value":"x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y","elementType":22,"rexp":""}],"id":11557},{"tabName":"基础参数","createTime":1559175040948,"elements":[{"visible":true,"defaultValue":"","toolTip":"进行相关性分析的计算方法","label":"计算方法","required":false,"sequence":1,"createTime":1559175040948,"extra":{},"name":"method","options":"pearson:pearson;kendall:kendall;spearman:spearman","id":29185,"placeholder":"","value":"pearson","elementType":3,"rexp":""}],"id":11558}],"description":"相关性分析:计算列的两两相关关系,请选择数值型数据,如果勾选了非数值类型数据,则会自动过滤,下个组件可能无法获取所有列。","serverId":582,"outputExtraData":[],"hasReport":false,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.CommonAlgorithm","top":101,"engine":"PYTHON","left":69,"allowViewSource":true,"name":"相关性分析","runStyle":"status-sus","id":"10000011","iconPath":"fa-pie-chart","minimumInput":1,"lastUpdateTime":1647224362248},{"outputs":[{"access":"SAME","left":60,"columns":"[]","cat":"MODEL","description":"模型","model":false,"id":"10000012_0_1","type":"OUTPUT","value":"10000012_0_1","key":"model","canPreview":false},{"access":"SAME","left":120,"columns":"[]","cat":"DATA","description":"预测值","model":false,"id":"10000012_0_2","type":"OUTPUT","value":"10000012_0_2","key":"data_out","canPreview":true}],"outputData":[{"key":"data_in","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","values":"","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0}]}],"inputData":[{"key":"data_in","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","values":"","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":13,"otherParam":0}]}],"inputs":[{"left":90,"cat":"DATA","isConnected":true,"description":"数据","model":false,"id":"10000012_1_1","type":"INPUT","value":"10000012_1_1","key":"data_in","canPreview":false}],"tabs":[{"tabName":"字段属性","createTime":1559178580438,"elements":[{"visible":true,"defaultValue":"","toolTip":"模型训练的特征。","label":"特征","required":false,"sequence":1,"createTime":1559178580438,"extra":{"featuresItems":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","values":"","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":13,"otherParam":0}],"key":"data_in"},"name":"features","options":"","id":29495,"placeholder":"","value":"x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13","elementType":5,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"模型训练的标签。","label":"标签","required":false,"sequence":2,"createTime":1559178580438,"extra":{"labelItems":[{"label":"x1","value":"x1"},{"label":"x2","value":"x2"},{"label":"x3","value":"x3"},{"label":"x4","value":"x4"},{"label":"x5","value":"x5"},{"label":"x6","value":"x6"},{"label":"x7","value":"x7"},{"label":"x8","value":"x8"},{"label":"x9","value":"x9"},{"label":"x10","value":"x10"},{"label":"x11","value":"x11"},{"label":"x12","value":"x12"},{"label":"x13","value":"x13"},{"label":"y","value":"y"}],"key":"data_in"},"name":"label","options":"","id":29493,"placeholder":"","value":"y","elementType":12,"rexp":""},{"visible":false,"defaultValue":"","toolTip":"新增的预测列的列名。","label":"新列名","required":false,"sequence":3,"createTime":1559178580438,"extra":{},"name":"add_col","options":"新增的预测列的列名","id":29494,"placeholder":"","value":"predict_value","elementType":18,"rexp":""}],"id":11680},{"tabName":"基础参数","createTime":1559178580438,"elements":[{"visible":true,"defaultValue":"","toolTip":"一个常数用以与L1项相乘,等于0则为最小二乘。 ","label":"L1项系数","required":false,"sequence":1,"createTime":1559178580438,"extra":{},"name":"alpha","options":"","id":29497,"placeholder":"","value":"1.0","elementType":1,"rexp":"/^[0-1]$|^0\\.[0-9]+$/"},{"visible":true,"defaultValue":"","toolTip":"是否计算此模型的截距。","label":"拟合截距","required":false,"sequence":2,"createTime":1559178580438,"extra":{},"name":"fit_intercept","options":"True:True;False:False","id":29498,"placeholder":"","value":"True","elementType":3,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"进行迭代次数的上限","label":"最大迭代次数","required":false,"sequence":3,"createTime":1559178580438,"extra":{},"name":"max_iter","options":"","id":29496,"placeholder":"","value":"500","elementType":1,"rexp":"/^[1-9]\\d*$/"}],"id":11681},{"tabName":"高级参数","createTime":1559178580438,"elements":[{"visible":true,"defaultValue":"","toolTip":"特征量X是否在回归之前进行数据归一化。","label":"归一化","required":false,"sequence":1,"createTime":1559178580438,"extra":{},"name":"normalize","options":"False:False;True:True","id":29502,"placeholder":"","value":"False","elementType":3,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"是否使用预先计算的Gram矩阵来加速计算。","label":"预计算","required":false,"sequence":2,"createTime":1559178580438,"extra":{},"name":"precompute","options":"False:False;True:True","id":29504,"placeholder":"","value":"False","elementType":3,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"(0,1)之前的float类型。模型停止训练的容错标准。","label":"容错率","required":false,"sequence":3,"createTime":1559178580438,"extra":{},"name":"tol","options":"","id":29501,"placeholder":"","value":"1e-06","elementType":1,"rexp":"/^0\\.\\d*[1-9]\\d*$|^[1-9]\\.\\d*[1-9]\\d*e-[1-9]+$/"},{"visible":true,"defaultValue":"","toolTip":"设置为True时,重用上一次调用的解决方案以适合初始化,否则,擦除以前的解决方案。","label":"热启动","required":false,"sequence":4,"createTime":1559178580438,"extra":{},"name":"warm_start","options":"False:False;True:True","id":29499,"placeholder":"","value":"False","elementType":3,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"是否强制系数为正。","label":"强制正相关","required":false,"sequence":5,"createTime":1559178580438,"extra":{},"name":"positive","options":"False:False;True:True","id":29503,"placeholder":"","value":"False","elementType":3,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"如果设置为“随机”,则每次迭代都会随机更新系数,而不是默认情况下按顺序循环使用要素。","label":"选择器","required":false,"sequence":6,"createTime":1559178580438,"extra":{},"name":"selection","options":"循环:cyclic;随机:random","id":29500,"placeholder":"","value":"cyclic","elementType":3,"rexp":""}],"id":11682}],"description":"Lasso回归是一个用于估计稀疏参数的线性模型,特别适用于参数数目缩减。","serverId":630,"outputExtraData":[{"dataType":"text","name":"predict_value","key":"add_col"}],"hasReport":true,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.CommonAlgorithm","top":99,"engine":"PYTHON","left":544,"allowViewSource":false,"name":"LASSO回归","runStyle":"status-sus","id":"10000012","iconPath":" fa fa-bullseye","minimumInput":1,"lastUpdateTime":1647224362282},{"outputs":[{"access":"SAME","left":90,"columns":"[]","cat":"DATA","description":"输出","model":false,"id":"10000013_0_1","type":"OUTPUT","value":"10000013_0_1","key":"output","canPreview":true}],"outputData":[{"key":"input","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":13,"otherParam":0}]}],"inputData":[{"key":"input","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","values":"","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":13,"otherParam":0}]}],"inputs":[{"left":90,"cat":"DATA","isConnected":true,"description":"数据","model":false,"id":"10000013_1_1","type":"INPUT","value":"10000013_1_1","key":"input","canPreview":false}],"tabs":[{"tabName":"字段属性","createTime":1560407200287,"elements":[{"visible":true,"defaultValue":"","toolTip":"进行操作的所有列","label":"特征","required":false,"sequence":1,"createTime":1560407200287,"extra":{"columnsItems":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x2","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"x9","index":8,"otherParam":0},{"dataType":"numeric","values":"","name":"x10","index":9,"otherParam":0},{"dataType":"numeric","values":"103,102,98,99,106","name":"x11","index":10,"otherParam":0},{"dataType":"numeric","values":"1,2","name":"x12","index":11,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":12,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":13,"otherParam":0}],"key":"input"},"name":"columns","options":"","id":30019,"placeholder":"","value":"x1,x3,x4,x5,x6,x7,x8,x13,y","elementType":5,"rexp":""}],"id":11929},{"tabName":"参数设置","createTime":1560407200287,"elements":[{"visible":true,"defaultValue":"","toolTip":"筛选条件","label":"条件","required":false,"sequence":1,"createTime":1560407200287,"extra":{"key":"input"},"name":"term","options":"","id":30020,"placeholder":"","value":"[]","elementType":11,"rexp":""}],"id":11930}],"description":"记录选择是对数据表的行进行筛选,只留下满足条件的数据行。","serverId":589,"outputExtraData":[],"hasReport":false,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.preprocessing.Selection","top":143,"engine":"PYTHON","left":294,"allowViewSource":false,"name":"记录选择","runStyle":"status-sus","id":"10000013","iconPath":"fa-joomla","minimumInput":1,"lastUpdateTime":1560409823413},{"outputs":[{"access":"SAME","left":90,"columns":"[]","cat":"DATA","description":"输出","model":false,"id":"10000014_0_1","type":"OUTPUT","value":"10000014_0_1","key":"output","canPreview":true}],"outputData":[{"key":"input1","dataFields":[]},{"key":"input2","dataFields":[]},{"key":"input3","dataFields":[]},{"key":"input4","dataFields":[]}],"inputData":[{"key":"input1","dataFields":[]},{"key":"input2","dataFields":[]},{"key":"input3","dataFields":[]},{"key":"input4","dataFields":[]}],"inputs":[{"left":36,"cat":"DATA","isConnected":true,"description":"输入一","model":false,"id":"10000014_1_1","type":"INPUT","value":"10000014_1_1","key":"input1","canPreview":false},{"left":72,"cat":"DATA","isConnected":false,"description":"输入二","model":false,"id":"10000014_1_2","type":"INPUT","value":"10000014_1_2","key":"input2","canPreview":false},{"left":108,"cat":"DATA","isConnected":false,"description":"输入三","model":false,"id":"10000014_1_3","type":"INPUT","value":"10000014_1_3","key":"input3","canPreview":false},{"left":144,"cat":"DATA","isConnected":false,"description":"输入四","model":false,"id":"10000014_1_4","type":"INPUT","value":"10000014_1_4","key":"input4","canPreview":false}],"tabs":[{"tabName":"字段属性","createTime":1539941963259,"elements":[{"visible":true,"defaultValue":"","creatorId":100,"creatorName":"admin","toolTip":"输入的表的表名","label":"输入","required":false,"sequence":1,"createTime":1539942007469,"extra":{},"name":"inputList","options":"","id":20717,"placeholder":"","value":"","elementType":14,"rexp":""},{"visible":true,"defaultValue":"","creatorId":100,"creatorName":"admin","toolTip":"data_in = db_utils.query(conn, 'select '+ field1 + field2 + ' from ' + inputs['input1']);return(data_in);注意每行代码需要缩进4个空格","label":"脚本","required":false,"sequence":2,"createTime":1539942007469,"extra":{},"name":"content","options":"","id":20718,"placeholder":"data_in = db_utils.query(conn, 'select '+ field1 + field2 + ' from ' + inputs['input1']);return(data_in)","value":" data_in = db_utils.query(conn, 'select * from admin.' + inputs['input1'])\n \n '''\n 载入模块\n '''\n import numpy as np\n import pandas as pd\n import warnings\n warnings.filterwarnings(\"ignore\")\n '''\n 自编的灰色预测函数\n '''\n def GM11(x0): #自定义灰色预测函数\n import numpy as np\n x1 = x0.cumsum() #1-AGO序列\n z1 = (x1[:len(x1)-1] + x1[1:])/2.0 #紧邻均值(MEAN)生成序列\n z1 = z1.reshape((len(z1),1))\n B = np.append(-z1, np.ones_like(z1), axis = 1)\n Yn = x0[1:].reshape((len(x0)-1, 1))\n [[a],[b]] = np.dot(np.dot(np.linalg.inv(np.dot(B.T, B)), B.T), Yn) #计算参数\n f = lambda k: (x0[0]-b/a)*np.exp(-a*(k-1))-(x0[0]-b/a)*np.exp(-a*(k-2)) #还原值\n delta = np.abs(x0 - np.array([f(i) for i in range(1,len(x0)+1)]))\n C = delta.std()/x0.std()\n P = 1.0*(np.abs(delta - delta.mean()) < 0.6745*x0.std()).sum()/len(x0)\n return f, a, b, x0[0], C, P #返回灰色预测函数、a、b、首项、方差比、小残差概率\n \n new_reg_data = data_in.drop('y', 1) # 特征列\n \n new_reg_data.index = range(1994, 2014)\n new_reg_data.loc[2014] = None\n new_reg_data.loc[2015] = None\n \n # 灰色预测\n l = ['x1', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x13']\n for i in l:\n f = GM11(new_reg_data.loc[range(1994, 2014),i].as_matrix())[0]\n new_reg_data.loc[2014,i] = f(len(new_reg_data)-1)#2014年预测结果\n new_reg_data.loc[2015,i] = f(len(new_reg_data)) ##2015年预测结果\n new_reg_data[i] = new_reg_data[i].round(2) ## 保留两位小数\n \n y = list(data_in['y'].values) # 提取财政收入列,合并至新数据框中\n y.extend([np.nan,np.nan])\n \n new_reg_data['y'] = y\n \n data_out = pd.DataFrame(new_reg_data)\n return(data_out)","elementType":10,"rexp":""}],"creatorId":100,"creatorName":"admin","id":8176}],"description":"Python脚本是指可直接将Python脚本按照一定格式粘贴至脚本区作为组件运行。","serverId":621,"outputExtraData":[],"hasReport":false,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.special.CustomPyScript","top":258,"engine":"PYTHON","left":125,"allowViewSource":false,"name":"灰色预测","runStyle":"status-sus","id":"10000014","iconPath":"fa-joomla","minimumInput":4,"lastUpdateTime":1647224362295},{"outputs":[{"access":"SAME","left":60,"columns":"[]","cat":"MODEL","description":"模型","model":false,"id":"10000015_0_1","type":"OUTPUT","value":"10000015_0_1","key":"model","canPreview":false},{"access":"APPEND","left":120,"columns":"[{\"name\":\"'predict_value'\",\"type\":\"numeric\"}]","cat":"DATA","description":"训练集预测结果","model":false,"id":"10000015_0_2","type":"OUTPUT","value":"10000015_0_2","key":"data_out","canPreview":true}],"outputData":[{"key":"data_in","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":7,"otherParam":0}]}],"inputData":[{"key":"data_in","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":8,"otherParam":0}]}],"inputs":[{"left":90,"cat":"DATA","isConnected":true,"description":"数据","model":false,"id":"10000015_1_1","type":"INPUT","value":"10000015_1_1","key":"data_in","canPreview":false}],"tabs":[{"tabName":"字段属性","createTime":1559178714912,"elements":[{"visible":true,"defaultValue":"","toolTip":"模型训练的特征。请选择数值型数据","label":"特征","required":false,"sequence":1,"createTime":1559178714912,"extra":{"featuresItems":[{"dataType":"numeric","values":"","name":"x1","index":0,"otherParam":0},{"dataType":"numeric","values":"","name":"x3","index":1,"otherParam":0},{"dataType":"numeric","values":"","name":"x4","index":2,"otherParam":0},{"dataType":"numeric","values":"","name":"x5","index":3,"otherParam":0},{"dataType":"numeric","values":"","name":"x6","index":4,"otherParam":0},{"dataType":"numeric","values":"","name":"x7","index":5,"otherParam":0},{"dataType":"numeric","values":"","name":"x8","index":6,"otherParam":0},{"dataType":"numeric","values":"","name":"x13","index":7,"otherParam":0},{"dataType":"numeric","values":"","name":"y","index":8,"otherParam":0}],"key":"data_in"},"name":"features","options":"","id":29595,"placeholder":"","value":"x1,x3,x4,x5,x6,x7,x8,x13","elementType":5,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"模型训练的标签。请选择数值型数据","label":"标签","required":false,"sequence":2,"createTime":1559178714912,"extra":{"labelItems":[{"label":"x1","value":"x1"},{"label":"x3","value":"x3"},{"label":"x4","value":"x4"},{"label":"x5","value":"x5"},{"label":"x6","value":"x6"},{"label":"x7","value":"x7"},{"label":"x8","value":"x8"},{"label":"x13","value":"x13"},{"label":"y","value":"y"}],"key":"data_in"},"name":"label","options":"","id":29596,"placeholder":"","value":"y","elementType":12,"rexp":""}],"id":11707},{"tabName":"基础参数","createTime":1559178714912,"elements":[{"visible":true,"defaultValue":"","toolTip":"指定要在算法中使用的内核类型","label":"核函数","required":false,"sequence":1,"createTime":1559178714912,"extra":{},"name":"kernel","options":"高斯核函数:rbf;线性核函数:linear;多项式核函数:poly;sigmoid核函数:sigmoid","id":29600,"placeholder":"","value":"rbf","elementType":3,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"正整数。该参数仅在内核为多项式核函数时起作用。","label":"多项式阶数","required":false,"sequence":2,"createTime":1559178714912,"extra":{},"name":"degree","options":"","id":29599,"placeholder":"","value":"2","elementType":1,"rexp":"/^[1-9]\\d*$/"},{"visible":true,"defaultValue":"","toolTip":"正float类型或auto。该参数仅在内核为多项式、高斯或sigmoid核函数时起作用。auto表示没有传递明确的gamma值。","label":"核系数","required":false,"sequence":3,"createTime":1559178714912,"extra":{},"name":"gamma","options":"","id":29598,"placeholder":"","value":"auto","elementType":1,"rexp":"/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$|^[auto]+$/"},{"visible":true,"defaultValue":"","toolTip":"正float类型。该参数仅在内核为多项式或sigmoid核函数时起作用。","label":"独立项","required":false,"sequence":4,"createTime":1559178714912,"extra":{},"name":"coef0","options":"","id":29597,"placeholder":"","value":"0.0","elementType":1,"rexp":"^(\\-|\\+)?\\d+(\\.\\d+)?$"},{"visible":true,"defaultValue":"","toolTip":"正float类型。错误的惩罚系数。","label":"惩罚系数","required":false,"sequence":5,"createTime":1559178714912,"extra":{},"name":"C","options":"","id":29601,"placeholder":"","value":"1.0","elementType":1,"rexp":"/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$/"}],"id":11708},{"tabName":"高级参数","createTime":1559178714912,"elements":[{"visible":true,"defaultValue":"","toolTip":"(0,1)之前的float类型。模型停止训练的容错标准。","label":"容错率","required":false,"sequence":1,"createTime":1559178714912,"extra":{},"name":"tol","options":"","id":29602,"placeholder":"","value":"1e-3","elementType":1,"rexp":"/^0\\.\\d*[1-9]\\d*$|^[1-9]\\.\\d*[1-9]\\d*e-[1-9]+$/"},{"visible":true,"defaultValue":"","toolTip":"float类型。训练集中的样本需满足模型拟合值与实际值的误差。","label":"距离误差","required":false,"sequence":2,"createTime":1559178714912,"extra":{},"name":"epsilon","options":"","id":29604,"placeholder":"","value":"0.1","elementType":1,"rexp":"^(\\-|\\+)?\\d+(\\.\\d+)?$"},{"visible":true,"defaultValue":"","toolTip":"是否使用收缩启发式。","label":"收缩启发式","required":false,"sequence":3,"createTime":1559178714912,"extra":{},"name":"shrinking","options":"True:True;False:False","id":29605,"placeholder":"","value":"True","elementType":3,"rexp":""},{"visible":true,"defaultValue":"","toolTip":"float类型。当数据较大时,指定内核缓存的大小。(以MB为单位)。","label":"缓存大小(MB)","required":false,"sequence":4,"createTime":1559178714912,"extra":{},"name":"cache_size","options":"True:True;False:False","id":29603,"placeholder":"","value":"200","elementType":1,"rexp":"/^\\d+(\\.\\d+)?$/"},{"visible":true,"defaultValue":"","toolTip":"int类型。进行迭代次数的上限。-1为无限制","label":"最大迭代次数","required":false,"sequence":5,"createTime":1559178714912,"extra":{},"name":"max_iter","options":"","id":29606,"placeholder":"","value":"-1","elementType":1,"rexp":"^[1-9]\\d*$ "}],"id":11709}],"description":"SVR(支持向量回归)是使用支持向量机解决回归问题。支持向量回归假设我们能容忍的f(x)与之间最多有ε的偏差,当且仅当f(x)与y的差别绝对值大于ε时,才计算损失,此时相当于以f(x)为中心,构建一个宽度为2ε的间隔带,若训练样本落入此间隔带,则认为是被预测正确的。","serverId":577,"outputExtraData":[],"hasReport":true,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.CommonAlgorithm","top":248,"engine":"PYTHON","left":458,"allowViewSource":true,"name":"支持向量回归","runStyle":"status-sus","id":"10000015","iconPath":" fa fa-bullseye","minimumInput":1,"lastUpdateTime":1647224362332},{"outputs":[{"access":"SAME","left":90,"columns":"[]","cat":"DATA","description":"预测结果","model":false,"id":"10000016_0_1","type":"OUTPUT","value":"10000016_0_1","key":"data_out","canPreview":true}],"outputData":[{"key":"model","dataFields":[]},{"key":"data_in","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0},{"dataType":"numeric","values":"","name":"x3","index":1},{"dataType":"numeric","values":"","name":"x4","index":2},{"dataType":"numeric","values":"","name":"x5","index":3},{"dataType":"numeric","values":"","name":"x6","index":4},{"dataType":"numeric","values":"","name":"x7","index":5},{"dataType":"numeric","values":"","name":"x8","index":6},{"dataType":"numeric","values":"","name":"x13","index":7}]}],"inputData":[{"key":"model","dataFields":[]},{"key":"data_in","dataFields":[{"dataType":"numeric","values":"","name":"x1","index":0},{"dataType":"numeric","values":"","name":"x3","index":1},{"dataType":"numeric","values":"","name":"x4","index":2},{"dataType":"numeric","values":"","name":"x5","index":3},{"dataType":"numeric","values":"","name":"x6","index":4},{"dataType":"numeric","values":"","name":"x7","index":5},{"dataType":"numeric","values":"","name":"x8","index":6},{"dataType":"numeric","values":"","name":"x13","index":7},{"dataType":"numeric","values":"","name":"y","index":8}]}],"inputs":[{"left":60,"cat":"MODEL","isConnected":true,"description":"模型","model":false,"id":"10000016_1_1","type":"INPUT","value":"10000016_1_1","key":"model","canPreview":false},{"left":120,"cat":"DATA","isConnected":true,"description":"数据","model":false,"id":"10000016_1_2","type":"INPUT","value":"10000016_1_2","key":"data_in","canPreview":false}],"tabs":[{"tabName":"字段属性","createTime":1539941963259,"elements":[{"visible":true,"defaultValue":"","creatorId":100,"creatorName":"admin","toolTip":"模型预测的特征","label":"特征","required":false,"sequence":1,"createTime":1539942007469,"extra":{"columnsItems":[{"dataType":"numeric","values":"","name":"x1","index":0},{"dataType":"numeric","values":"","name":"x3","index":1},{"dataType":"numeric","values":"","name":"x4","index":2},{"dataType":"numeric","values":"","name":"x5","index":3},{"dataType":"numeric","values":"","name":"x6","index":4},{"dataType":"numeric","values":"","name":"x7","index":5},{"dataType":"numeric","values":"","name":"x8","index":6},{"dataType":"numeric","values":"","name":"x13","index":7},{"dataType":"numeric","values":"","name":"y","index":8}],"key":"data_in"},"name":"columns","options":"","id":20987,"placeholder":"","value":"x1,x3,x4,x5,x6,x7,x8,x13","elementType":5,"rexp":""},{"visible":false,"defaultValue":"","creatorId":100,"creatorName":"admin","toolTip":"","label":"新增预测列列名","required":false,"sequence":2,"createTime":1539942007469,"extra":{"key":"data_in"},"name":"add_col","options":"","id":20988,"placeholder":"","value":"predict_label","elementType":18,"rexp":""}],"creatorId":100,"creatorName":"admin","id":8291}],"description":"对分类算法模型进行预测。","serverId":561,"outputExtraData":[{"dataType":"text","name":"predict_label","key":"add_col"}],"hasReport":false,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.predict.Predictor","top":358,"engine":"PYTHON","left":176,"allowViewSource":false,"name":"模型预测","runStyle":"status-sus","id":"10000016","iconPath":"fa-line-chart","minimumInput":2,"lastUpdateTime":1560395944951},{"outputs":[{"access":"SAME","left":90,"columns":"[]","cat":"DATA","description":"输出","model":false,"id":"10000017_0_1","type":"OUTPUT","value":"10000017_0_1","key":"output","canPreview":true}],"outputData":[{"key":"input1","dataFields":[]},{"key":"input2","dataFields":[]},{"key":"input3","dataFields":[]},{"key":"input4","dataFields":[]}],"inputData":[{"key":"input1","dataFields":[]},{"key":"input2","dataFields":[]},{"key":"input3","dataFields":[]},{"key":"input4","dataFields":[]}],"inputs":[{"left":36,"cat":"DATA","isConnected":true,"description":"输入一","model":false,"id":"10000017_1_1","type":"INPUT","value":"10000017_1_1","key":"input1","canPreview":false},{"left":72,"cat":"DATA","isConnected":true,"description":"输入二","model":false,"id":"10000017_1_2","type":"INPUT","value":"10000017_1_2","key":"input2","canPreview":false},{"left":108,"cat":"DATA","isConnected":false,"description":"输入三","model":false,"id":"10000017_1_3","type":"INPUT","value":"10000017_1_3","key":"input3","canPreview":false},{"left":144,"cat":"DATA","isConnected":false,"description":"输入四","model":false,"id":"10000017_1_4","type":"INPUT","value":"10000017_1_4","key":"input4","canPreview":false}],"tabs":[{"tabName":"字段属性","createTime":1539941963259,"elements":[{"visible":true,"defaultValue":"","creatorId":100,"creatorName":"admin","toolTip":"输入的表的表名","label":"输入","required":false,"sequence":1,"createTime":1539942007469,"extra":{},"name":"inputList","options":"","id":20717,"placeholder":"","value":"","elementType":14,"rexp":""},{"visible":true,"defaultValue":"","creatorId":100,"creatorName":"admin","toolTip":"data_in = db_utils.query(conn, 'select '+ field1 + field2 + ' from ' + inputs['input1']);return(data_in);注意每行代码需要缩进4个空格","label":"脚本","required":false,"sequence":2,"createTime":1539942007469,"extra":{},"name":"content","options":"","id":20718,"placeholder":"data_in = db_utils.query(conn, 'select '+ field1 + field2 + ' from ' + inputs['input1']);return(data_in)","value":" data_1 = db_utils.query(conn, 'select * from ' + inputs['input1'])\r\n data_2 = db_utils.query(conn, 'select * from ' + inputs['input2'])\r\n \r\n # 整合1994~2013与2014、2015年财政收入\r\n y = data_2['y'].append(data_1['predict_label'].tail(2))\r\n \r\n import pandas as pd\r\n data_out = pd.DataFrame({'label':range(1994, 2016),'y':y})\r\n \r\n return(data_out)","elementType":10,"rexp":""}],"creatorId":100,"creatorName":"admin","id":8176}],"description":"Python脚本是指可直接将Python脚本按照一定格式粘贴至脚本区作为组件运行。","serverId":621,"outputExtraData":[],"hasReport":false,"targetAlgorithm":"com.tipdm.framework.dmserver.core.algo.unparallel.special.CustomPyScript","top":445,"engine":"PYTHON","left":308,"allowViewSource":false,"name":"Python脚本","runStyle":"status-sus","id":"10000017","iconPath":"fa-joomla","minimumInput":4,"lastUpdateTime":1647224362311}],"links":[{"d":"M 402 43 Q 402 73 281 72 T 160 101","inputPortId":"10000011_1_1","runStyle":"","id":"10000010_0_1_10000011_1_1","source":"10000010","outputPortId":"10000010_0_1","target":"10000011"},{"d":"M 402 43 Q 402 73 518.5 71 T 635 99","inputPortId":"10000012_1_1","runStyle":"","id":"10000010_0_1_10000012_1_1","source":"10000010","outputPortId":"10000010_0_1","target":"10000012"},{"d":"M 402 43 Q 402 93 393.5 93 T 385 143","inputPortId":"10000013_1_1","runStyle":"","id":"10000010_0_1_10000013_1_1","source":"10000010","outputPortId":"10000010_0_1","target":"10000013"},{"d":"M 386 181 Q 386 219.5 274 219.5 T 162 258","inputPortId":"10000014_1_1","runStyle":"","id":"10000013_0_1_10000014_1_1","source":"10000013","outputPortId":"10000013_0_1","target":"10000014"},{"d":"M 386 181 Q 386 214.5 467.5 214.5 T 549 248","inputPortId":"10000015_1_1","runStyle":"","id":"10000013_0_1_10000015_1_1","source":"10000013","outputPortId":"10000013_0_1","target":"10000015"},{"d":"M 386 181 Q 386 231 383.5 313 T 381 445","inputPortId":"10000017_1_2","runStyle":"","id":"10000013_0_1_10000017_1_2","source":"10000013","outputPortId":"10000013_0_1","target":"10000017"},{"d":"M 217 296 Q 217 327 257 327 T 297 358","inputPortId":"10000016_1_2","runStyle":"","id":"10000014_0_1_10000016_1_2","source":"10000014","outputPortId":"10000014_0_1","target":"10000016"},{"d":"M 520 286 Q 520 322 378.5 322 T 237 358","inputPortId":"10000016_1_1","runStyle":"","id":"10000015_0_1_10000016_1_1","source":"10000015","outputPortId":"10000015_0_1","target":"10000016"},{"d":"M 268 396 Q 268 426 306.5 420.5 T 345 445","inputPortId":"10000017_1_1","runStyle":"","id":"10000016_0_1_10000017_1_1","source":"10000016","outputPortId":"10000016_0_1","target":"10000017"}]}