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

'<strong>PAL</strong>_UNIVARSTAT_DATA_T','IN');<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_PDATA_TBL VALUES (2,'DM_<strong>PAL</strong>', '<strong>PAL</strong>_CONTROL_T','IN');<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_PDATA_TBL VALUES (3,'DM_<strong>PAL</strong>',<br />

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

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

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE('AFL<strong>PAL</strong>', 'UNIVARSTAT', 'DM_<strong>PAL</strong>',<br />

'<strong>PAL</strong>_UNIVARIATESTAT_PROC', <strong>PAL</strong>_UNIVARSTAT_PDATA_TBL);<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_UNIVARSTAT_DATA_TBL LIKE <strong>PAL</strong>_UNIVARSTAT_DATA_T;<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_DATA_TBL VALUES (1,2.4);<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_DATA_TBL VALUES (5,3.5);<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_DATA_TBL VALUES (3,8.9);<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_DATA_TBL VALUES (10,-1.4);<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_DATA_TBL VALUES (-4,-3.5);<br />

INSERT INTO <strong>PAL</strong>_UNIVARSTAT_DATA_TBL VALUES (11,32.8);<br />

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

CREATE LOCAL TEMPORARY COLUMN TABLE #<strong>PAL</strong>_CONTROL_TBL(<br />

"NAME" VARCHAR (50),<br />

"INTARGS" INTEGER,<br />

"DOUBLEARGS" DOUBLE,<br />

"STRINGARGS" VARCHAR (100)<br />

);<br />

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

value is 1, it can be {0,1,2}<br />

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

value is 1, it can be {0,1,2}<br />

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

value is 0, it can be {0,1}<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_UNIVARSTAT_RESULT_TBL LIKE <strong>PAL</strong>_UNIVARSTAT_RESULT_T;<br />

CALL DM_<strong>PAL</strong>.<strong>PAL</strong>_UNIVARIATESTAT_PROC(<strong>PAL</strong>_UNIVARSTAT_DATA_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

<strong>PAL</strong>_UNIVARSTAT_RESULT_TBL) WITH OVERVIEW;<br />

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

Expected Result<br />

3.7.10 Variance Equal Test<br />

This function is used to test the equality of two random variances using F-test. The null hypothesis is that two<br />

independent normal variances are equal. The observed sums of some selected squares are then examined to<br />

see whether their ratio is significantly incompatible with this null hypothesis.<br />

Let x 1 , x 2 , ..., x n and y 1 , y 2 , ..., y n be independent and identically distributed samples from two<br />

populations.<br />

536 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!