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

'IN');<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_PDATA_TBL VALUES(4, 'DM_<strong>PAL</strong>', '<strong>PAL</strong>_PCA_SCALING_INFO_T',<br />

'IN');<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_PDATA_TBL VALUES(5, 'DM_<strong>PAL</strong>', '<strong>PAL</strong>_PCAPROJ_SCORES_T',<br />

'OUT');<br />

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

CALL<br />

SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE('AFL<strong>PAL</strong>','PCAPROJECTION','DM_<strong>PAL</strong>','<strong>PAL</strong>_PCAPR<br />

OJ_PROC',<strong>PAL</strong>_PCAPROJ_PDATA_TBL);<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_DATA_TBL VALUES(1,2,32,10,54,38,20);<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_DATA_TBL VALUES(2,9,57,20,25,48,19);<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_DATA_TBL VALUES(3,12,24,28,35,30,20);<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_DATA_TBL VALUES(4,15,42,27,36,61,27);<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_CONTROL_TBL VALUES ('THREAD_NUMBER', 2, NULL, NULL);<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_CONTROL_TBL VALUES ('SCALING', 1, NULL, NULL);<br />

INSERT INTO <strong>PAL</strong>_PCAPROJ_CONTROL_TBL VALUES ('MAX_COMPONENTS', 4, NULL, NULL);<br />

CALL DM_<strong>PAL</strong>.<strong>PAL</strong>_PCAPROJ_PROC(<strong>PAL</strong>_PCAPROJ_DATA_TBL, <strong>PAL</strong>_PCAPROJ_CONTROL_TBL,<br />

<strong>PAL</strong>_PCA_LOADINGS_TBL, <strong>PAL</strong>_PCA_SCALING_INFO_TBL, <strong>PAL</strong>_PCAPROJ_SCORES_TBL) WITH<br />

OVERVIEW;<br />

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

Expected Result<br />

<strong>PAL</strong>_PCAPROJ_SCORES_TBL:<br />

3.6.8 Random Distribution Sampling<br />

Random distribution sampling is a random generation function with a given distribution.<br />

In <strong>PAL</strong>, this function supports four different distributions. The probability density functions of different<br />

distributions are defined as follows:<br />

●<br />

Uniform<br />

●<br />

Normal<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 465

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

Saved successfully!

Ooh no, something went wrong!