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>_SLIGHT_SIL_PDATA_TBL VALUES (3, 'DM_<strong>PAL</strong>',<br />

'<strong>PAL</strong>_SLIGHT_SIL_RESULT_T', 'OUT');<br />

CALL "SYS".AFLLANG_WRAPPER_PROCEDURE_DROP('DM_<strong>PAL</strong>', '<strong>PAL</strong>_SLIGHT_SIL_PROC');<br />

CALL "SYS".AFLLANG_WRAPPER_PROCEDURE_CREATE('AFL<strong>PAL</strong>', 'SLIGHTSILHOUETTE',<br />

'DM_<strong>PAL</strong>', '<strong>PAL</strong>_SLIGHT_SIL_PROC', <strong>PAL</strong>_SLIGHT_SIL_PDATA_TBL);<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_SLIGHT_SIL_TBL LIKE <strong>PAL</strong>_SLIGHT_SIL_T;<br />

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

INSERT INTO <strong>PAL</strong>_SLIGHT_SIL_TBL VALUES (15.7, 'A', 1.6, 3);<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 ('NORMALIZATION', 0, 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 ('CATEGORY_WEIGHTS', null, 0.7, null);<br />

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_SLIGHT_SIL_RESULT_TBL LIKE <strong>PAL</strong>_SLIGHT_SIL_RESULT_T;<br />

CALL "DM_<strong>PAL</strong>".<strong>PAL</strong>_SLIGHT_SIL_PROC(<strong>PAL</strong>_SLIGHT_SIL_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

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

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

Expected Result<br />

3.1.13 Incremental Clustering on <strong>SAP</strong> <strong>HANA</strong> Smart Data<br />

Streaming<br />

For information on incremental clustering on <strong>SAP</strong> <strong>HANA</strong> Smart Data Streaming, see "Example: DenStream<br />

Clustering" in the <strong>SAP</strong> <strong>HANA</strong> Smart Data Streaming: Developer Guide.<br />

Note<br />

<strong>SAP</strong> <strong>HANA</strong> Smart Data Streaming is only supported on Intel-based hardware platforms.<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 117

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

Saved successfully!

Ooh no, something went wrong!