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>_GMM_DATA_TBL VALUES(18,10.12,10.12,'B');<br />

INSERT INTO <strong>PAL</strong>_GMM_DATA_TBL VALUES(19,10.12,10.13,'B');<br />

INSERT INTO <strong>PAL</strong>_GMM_DATA_TBL VALUES(20,10.13,10.12,'B');<br />

INSERT INTO <strong>PAL</strong>_GMM_DATA_TBL VALUES(21,10.13,10.13,'B');<br />

INSERT INTO <strong>PAL</strong>_GMM_DATA_TBL VALUES(22,10.13,10.14,'B');<br />

INSERT INTO <strong>PAL</strong>_GMM_DATA_TBL VALUES(23,10.14,10.13,'B');<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_GMM_INIT_TBL LIKE <strong>PAL</strong>_GMM_INIT_T;<br />

INSERT INTO <strong>PAL</strong>_GMM_INIT_TBL VALUES(0,2);<br />

DROP TABLE #<strong>PAL</strong>_CONTROL_TBL;<br />

CREATE LOCAL TEMPORARY COLUMN TABLE #<strong>PAL</strong>_CONTROL_TBL LIKE <strong>PAL</strong>_CONTROL_T;<br />

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

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

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

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

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_GMM_RESULTS_TBL LIKE <strong>PAL</strong>_GMM_RESULTS_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_GMM_RESULTSMODEL_TBL LIKE <strong>PAL</strong>_GMM_RESULTSMODEL_T;<br />

CALL DM_<strong>PAL</strong>.<strong>PAL</strong>_GMM(<strong>PAL</strong>_GMM_DATA_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

<strong>PAL</strong>_GMM_INIT_TBL,<strong>PAL</strong>_GMM_RESULTS_TBL,<strong>PAL</strong>_GMM_RESULTSMODEL_TBL) with OVERVIEW;<br />

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

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

Expected Results<br />

<strong>PAL</strong>_GMM_RESULTS_TBL:<br />

62 P U B L I C<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Predictive</strong> <strong>Analysis</strong> <strong>Library</strong> (<strong>PAL</strong>)<br />

<strong>PAL</strong> Functions

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

Saved successfully!

Ooh no, something went wrong!