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>_CONTROL_TBL VALUES ('GROUP_NUMBER', 4, null, null);<br />

INSERT INTO #<strong>PAL</strong>_CONTROL_TBL VALUES ('INIT_TYPE', 1, 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 />

INSERT INTO #<strong>PAL</strong>_CONTROL_TBL VALUES ('EXIT_THRESHOLD', null, 1.0E-6, null);<br />

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_KMEANS_DATA_TBL LIKE <strong>PAL</strong>_KMEANS_DATA_T;<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (0, 0.5, 'A', 0.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (1, 1.5, 'A', 0.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (2, 1.5, 'A', 1.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (3, 0.5, 'A', 1.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (4, 1.1, 'B', 1.2);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (5, 0.5, 'B', 15.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (6, 1.5, 'B', 15.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (7, 1.5, 'B', 16.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (8, 0.5, 'B', 16.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (9, 1.2, 'C', 16.1);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (10, 15.5, 'C', 15.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (11, 16.5, 'C', 15.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (12, 16.5, 'C', 16.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (13, 15.5, 'C', 16.5);<br />

INSERT INTO <strong>PAL</strong>_KMEANS_DATA_TBL VALUES (14, 15.6, 'D', 16.2);<br />

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

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

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

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

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_KMEANS_ASSIGNED_TBL LIKE <strong>PAL</strong>_KMEANS_ASSIGNED_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_KMEANS_CENTERS_TBL LIKE <strong>PAL</strong>_KMEANS_CENTERS_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_KMEANS_SIL_CENTERS_TBL LIKE <strong>PAL</strong>_KMEANS_SIL_CENTERS_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_KMEANS_STATISTIC_TBL LIKE <strong>PAL</strong>_KMEANS_STATISTIC_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_KMEANS_MODEL_TBL LIKE <strong>PAL</strong>_KMEANS_MODEL_T;<br />

CALL "DM_<strong>PAL</strong>".<strong>PAL</strong>_KMEANS_PROC(<strong>PAL</strong>_KMEANS_DATA_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

<strong>PAL</strong>_KMEANS_ASSIGNED_TBL, <strong>PAL</strong>_KMEANS_CENTERS_TBL, <strong>PAL</strong>_KMEANS_SIL_CENTERS_TBL,<br />

<strong>PAL</strong>_KMEANS_STATISTIC_TBL, <strong>PAL</strong>_KMEANS_MODEL_TBL) with OVERVIEW;<br />

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

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

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

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

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

Expected Result<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 71

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

Saved successfully!

Ooh no, something went wrong!