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>_APRIORI_DATA_TBL VALUES (4, 'item1');<br />

INSERT INTO <strong>PAL</strong>_APRIORI_DATA_TBL VALUES (4, 'item3');<br />

INSERT INTO <strong>PAL</strong>_APRIORI_DATA_TBL VALUES (5, 'item2');<br />

INSERT INTO <strong>PAL</strong>_APRIORI_DATA_TBL VALUES (5, 'item3');<br />

INSERT INTO <strong>PAL</strong>_APRIORI_DATA_TBL VALUES (6, 'item1');<br />

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

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

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

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

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

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

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

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

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

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

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

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

INSERT INTO <strong>PAL</strong>_APRIORI_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 ('MIN_SUPPORT', null, 0.1, null);<br />

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

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

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_APRIORI_RULES_TBL LIKE <strong>PAL</strong>_APRIORI_RULES_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_APRIORI_ANTE_ITEMS_TBL LIKE <strong>PAL</strong>_APRIORI_ANTE_ITEMS_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_APRIORI_CONS_ITEMS_TBL LIKE <strong>PAL</strong>_APRIORI_CONS_ITEMS_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_APRIORI_PMMLMODEL_TBL LIKE <strong>PAL</strong>_APRIORI_PMMLMODEL_T;<br />

CALL "DM_<strong>PAL</strong>".<strong>PAL</strong>_APRIORI2_PROC(<strong>PAL</strong>_APRIORI_DATA_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

<strong>PAL</strong>_APRIORI_RULES_TBL, <strong>PAL</strong>_APRIORI_ANTE_ITEMS_TBL, <strong>PAL</strong>_APRIORI_CONS_ITEMS_TBL,<br />

<strong>PAL</strong>_APRIORI_PMMLMODEL_TBL) with OVERVIEW;<br />

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

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

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

SELECT * FROM <strong>PAL</strong>_APRIORI_PMMLMODEL_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 297

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

Saved successfully!

Ooh no, something went wrong!