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.

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (6, 'item3');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (0, 'item1');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (0, 'item2');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (0, 'item5');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (1, 'item2');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (1, 'item4');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (7, 'item1');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (7, 'item2');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (7, 'item3');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (7, 'item5');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (8, 'item1');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (8, 'item2');<br />

INSERT INTO <strong>PAL</strong>_KORD_DATA_TBL VALUES (8, 'item3');<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 ('TOPK', 5, null, null);<br />

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

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

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

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

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_KORD_RULES_TBL LIKE <strong>PAL</strong>_KORD_RULES_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_KORD_ANTE_ITEMS_TBL LIKE <strong>PAL</strong>_KORD_ANTE_ITEMS_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_KORD_CONS_ITEMS_TBL LIKE <strong>PAL</strong>_KORD_CONS_ITEMS_T;<br />

CALL "DM_<strong>PAL</strong>".<strong>PAL</strong>_KORD_PROC(<strong>PAL</strong>_KORD_DATA_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

<strong>PAL</strong>_KORD_RULES_TBL, <strong>PAL</strong>_KORD_ANTE_ITEMS_TBL, <strong>PAL</strong>_KORD_CONS_ITEMS_TBL) with<br />

OVERVIEW;<br />

SELECT * FROM <strong>PAL</strong>_KORD_RULES_TBL ORDER BY "MEASURE" DESC;<br />

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

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

Expected Result<br />

<strong>PAL</strong>_KORD_RULES_TBL<br />

<strong>PAL</strong>_KORD_ANTE_ITEMS_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 319

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

Saved successfully!

Ooh no, something went wrong!