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

INSERT INTO <strong>PAL</strong>_LITEAPRIORI_DATA_TBL VALUES (3, 'item2');<br />

INSERT INTO <strong>PAL</strong>_LITEAPRIORI_DATA_TBL VALUES (3, 'item4');<br />

INSERT INTO <strong>PAL</strong>_LITEAPRIORI_DATA_TBL VALUES (4, 'item1');<br />

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

INSERT INTO <strong>PAL</strong>_LITEAPRIORI_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.3, null);<br />

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

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

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_LITEAPRIORI_RESULT_TBL LIKE <strong>PAL</strong>_LITEAPRIORI_RESULT_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_LITEAPRIORI_PMMLMODEL_TBL LIKE<br />

<strong>PAL</strong>_LITEAPRIORI_PMMLMODEL_T;<br />

CALL "DM_<strong>PAL</strong>".<strong>PAL</strong>_LITE_APRIORI_RULE_PROC(<strong>PAL</strong>_LITEAPRIORI_DATA_TBL,<br />

#<strong>PAL</strong>_CONTROL_TBL, <strong>PAL</strong>_LITEAPRIORI_RESULT_TBL, <strong>PAL</strong>_LITEAPRIORI_PMMLMODEL_TBL)<br />

WITH OVERVIEW;<br />

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

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

Expected Result<br />

<strong>PAL</strong>_LITEAPRIORI_RESULT_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 303

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

Saved successfully!

Ooh no, something went wrong!