[Step By Step]SAP HANA PAL逻辑回归预测分析Logistic Regression编程实例FORECASTWITHLOGISTICR(预测)

逻辑回归预测分析编程规范(模型):http://www.cnblogs.com/omygod/archive/2013/05/15/3080437.html

逻辑回归预测分析编程规范(预测):http://www.cnblogs.com/omygod/archive/2013/05/15/3080441.html

逻辑回归预测分析编程规范(实例):http://www.cnblogs.com/omygod/archive/2013/05/16/3081367.html

 

SET SCHEMA PAL;

-- PAL setup

CREATE TYPE PAL_T_RGP_DATA AS TABLE (ID INTEGER, LIFESPEND INTEGER); 
CREATE TYPE PAL_T_RGP_FITTED AS TABLE (ID INTEGER, FITTED DOUBLE, GENDER INTEGER);

CREATE COLUMN TABLE PAL_RGP_SIGNATURE (ID INTEGER, TYPENAME VARCHAR(100), DIRECTION VARCHAR(100)); 
INSERT INTO PAL_RGP_SIGNATURE VALUES (1, 'PAL_T_RGP_DATA', 'in'); 
INSERT INTO PAL_RGP_SIGNATURE VALUES (2, 'PAL_T_RG_PARAMS', 'in'); 
INSERT INTO PAL_RGP_SIGNATURE VALUES (3, 'PAL_T_RG_COEFF', 'in'); 
INSERT INTO PAL_RGP_SIGNATURE VALUES (4, 'PAL_T_RGP_FITTED', 'out');

CALL SYSTEM.AFL_WRAPPER_GENERATOR ('PAL_RGP', 'AFLPAL', 'FORECASTWITHLOGISTICR', PAL_RGP_SIGNATURE);

-- app setup

CREATE COLUMN TABLE RGP_PREDICT LIKE PAL_T_RGP_DATA; 
CREATE COLUMN TABLE RGP_PREDICTED LIKE PAL_T_RGP_FITTED;

-- app runtime

TRUNCATE TABLE RGP_PREDICT; 
INSERT INTO RGP_PREDICT VALUES (1,3000); 
INSERT INTO RGP_PREDICT VALUES (2,5000); 
INSERT INTO RGP_PREDICT VALUES (3,9000); 
INSERT INTO RGP_PREDICT VALUES (4,12000); 
INSERT INTO RGP_PREDICT VALUES (5,14000);

TRUNCATE TABLE RGP_PREDICTED;

CALL _SYS_AFL.PAL_RGP (RGP_PREDICT, RG_PARAMS, RG_COEFF, RGP_PREDICTED) WITH OVERVIEW;

专注于企业信息化,最近对股票数据分析较为感兴趣,可免费分享股票个股主力资金实时变化趋势分析工具,股票交流QQ群:457394862
分类: SAP HANA

本文转自沧海-重庆博客园博客,原文链接:http://www.cnblogs.com/omygod/archive/2013/05/16/3081371.html,如需转载请自行联系原作者
上一篇:域策略应用简述


下一篇:交互式分析(Hologres)2021年3月刊