25.10.2016 Views

SAP HANA Predictive Analysis Library (PAL)

sap_hana_predictive_analysis_library_pal_en

sap_hana_predictive_analysis_library_pal_en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

);<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_PDATA_TBL VALUES (1, 'DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRPROB_DATA_T',<br />

'IN');<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_PDATA_TBL VALUES (2,'DM_<strong>PAL</strong>',<br />

'<strong>PAL</strong>_DISTRPROB_DISTRPARAM_T', 'IN');<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_PDATA_TBL VALUES (3, 'DM_<strong>PAL</strong>','<strong>PAL</strong>_CONTROL_T', 'IN');<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_PDATA_TBL VALUES (4,<br />

'DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRPROB_RESULT_T', 'OUT');<br />

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_DROP('DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRPROB_PROC');<br />

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE('AFL<strong>PAL</strong>',<br />

'DISTRPROB','DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRPROB_PROC', <strong>PAL</strong>_DISTRPROB_PDATA_TBL);<br />

DROP TABLE <strong>PAL</strong>_DISTRPROB_DATA_TBL;<br />

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRPROB_DATA_TBL LIKE <strong>PAL</strong>_DISTRPROB_DATA_T;<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DATA_TBL VALUES (6);<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DATA_TBL VALUES (10);<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DATA_TBL VALUES (12);<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DATA_TBL VALUES (24);<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DATA_TBL VALUES (32);<br />

DROP TABLE <strong>PAL</strong>_DISTRPROB_DISTRPARAM_TBL;<br />

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRPROB_DISTRPARAM_TBL LIKE <strong>PAL</strong>_DISTRPROB_DISTRPARAM_T;<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DISTRPARAM_TBL VALUES ('DistributionName', 'Weibull');<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DISTRPARAM_TBL VALUES ('Shape', '1.71902');<br />

INSERT INTO <strong>PAL</strong>_DISTRPROB_DISTRPARAM_TBL VALUES ('Scale', '20.444');<br />

DROP TABLE #<strong>PAL</strong>_CONTROL_TBL;<br />

CREATE LOCAL TEMPORARY COLUMN TABLE #<strong>PAL</strong>_CONTROL_TBL(<br />

"NAME" VARCHAR (50),<br />

"INTARGS" INTEGER,<br />

"DOUBLEARGS" DOUBLE,<br />

"STRINGARGS" VARCHAR (100)<br />

);<br />

INSERT INTO #<strong>PAL</strong>_CONTROL_TBL VALUES ('LOWER_UPPER',0,null,null);<br />

DROP TABLE <strong>PAL</strong>_DISTRPROB_RESULT_TBL;<br />

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRPROB_RESULT_TBL LIKE <strong>PAL</strong>_DISTRPROB_RESULT_T;<br />

CALL DM_<strong>PAL</strong>.<strong>PAL</strong>_DISTRPROB_PROC(<strong>PAL</strong>_DISTRPROB_DATA_TBL,<br />

<strong>PAL</strong>_DISTRPROB_DISTRPARAM_TBL, #<strong>PAL</strong>_CONTROL_TBL, <strong>PAL</strong>_DISTRPROB_RESULT_TBL) WITH<br />

OVERVIEW;<br />

SELECT * FROM <strong>PAL</strong>_DISTRPROB_RESULT_TBL;<br />

The expected result is as follows:<br />

Related Information<br />

Kaplan-Meier Survival <strong>Analysis</strong> [page 518]<br />

Distribution Fitting [page 504]<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Predictive</strong> <strong>Analysis</strong> <strong>Library</strong> (<strong>PAL</strong>)<br />

End-to-End Scenarios P U B L I C 575

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!