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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSERT INTO <strong>PAL</strong>_AD_DATA_TBL VALUES (15, 15.5, 0.5);<br />

INSERT INTO <strong>PAL</strong>_AD_DATA_TBL VALUES (16, 16.5, 0.5);<br />

INSERT INTO <strong>PAL</strong>_AD_DATA_TBL VALUES (17, 16.5, 1.5);<br />

INSERT INTO <strong>PAL</strong>_AD_DATA_TBL VALUES (18, 15.5, 1.5);<br />

INSERT INTO <strong>PAL</strong>_AD_DATA_TBL VALUES (19, 15.7, 1.6);<br />

INSERT INTO <strong>PAL</strong>_AD_DATA_TBL VALUES (20, -1.0, -1.0);<br />

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

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

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

"INTARGS" INTEGER,<br />

"DOUBLEARGS" DOUBLE,<br />

"STRINGARGS" VARCHAR(100)<br />

);<br />

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

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

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

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

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_AD_RESULT_TBL LIKE <strong>PAL</strong>_AD_RESULT_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_AD_STATISTIC_TBL LIKE <strong>PAL</strong>_AD_STATISTIC_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_AD_CENTERS_TBL LIKE <strong>PAL</strong>_AD_CENTERS_T;<br />

CALL DM_<strong>PAL</strong>.<strong>PAL</strong>_ANOMALY_DETECTION_PROC(<strong>PAL</strong>_AD_DATA_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

<strong>PAL</strong>_AD_RESULT_TBL, <strong>PAL</strong>_AD_STATISTIC_TBL, <strong>PAL</strong>_AD_CENTERS_TBL) with OVERVIEW;<br />

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

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

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

Expected Result<br />

<strong>PAL</strong>_AD_RESULT_TBL:<br />

<strong>PAL</strong>_AD_STATISTIC_TBL:<br />

<strong>PAL</strong>_AD_CENTERS_TBL:<br />

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

<strong>PAL</strong> Functions P U B L I C 37

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

Saved successfully!

Ooh no, something went wrong!