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.

The procedure name is the same as specified in the procedure generation.<br />

The input, result, and statvalue tables must be of the types specified in the signature table.<br />

Signature<br />

Input Table<br />

Table 366:<br />

Table Column Column Data Type Description Constraint<br />

Data 1st column Integer, bigint, varchar,<br />

or nvarchar<br />

ID<br />

This must be the first<br />

column.<br />

2nd column Integer or double Observed data<br />

3rd column Double Expected frequency P The sum of expected<br />

frequency must be 1.<br />

Output Tables<br />

Table 367:<br />

Table Column Column Data Type Description<br />

Result 1st column Integer, bigint, varchar, or<br />

nvarchar<br />

ID<br />

2nd column Double Observed data<br />

3rd column Double Expected data<br />

4th column Double The residual<br />

Stat Value 1st column Varchar or nvarchar Name of statistics<br />

2nd column Double Value of statistics<br />

Example<br />

Assume that:<br />

●<br />

●<br />

●<br />

DM_<strong>PAL</strong> is a schema belonging to USER1; and<br />

USER1 has been assigned the AFLPM_CREATOR_ERASER_EXECUTE role; and<br />

USER1 has been assigned the AFL__SYS_AFL_AFL<strong>PAL</strong>_EXECUTE or<br />

AFL__SYS_AFL_AFL<strong>PAL</strong>_EXECUTE_WITH_GRANT_OPTION role.<br />

SET SCHEMA DM_<strong>PAL</strong>;<br />

DROP TYPE <strong>PAL</strong>_CHISQTESTFIT_DATA_T;<br />

CREATE TYPE <strong>PAL</strong>_CHISQTESTFIT_DATA_T AS TABLE(<br />

"ID" INTEGER,<br />

"OBSERVED" DOUBLE,<br />

"P" DOUBLE<br />

);<br />

DROP TYPE <strong>PAL</strong>_CHISQTESTFIT_RESULT_T;<br />

CREATE TYPE <strong>PAL</strong>_CHISQTESTFIT_RESULT_T AS TABLE(<br />

"ID" INTEGER,<br />

"OBSERVED" DOUBLE,<br />

"EXPECTED" DOUBLE,<br />

"RESIDUAL" DOUBLE<br />

);<br />

DROP TYPE <strong>PAL</strong>_CHISQTESTFIT_STATVALUE_T;<br />

CREATE TYPE <strong>PAL</strong>_CHISQTESTFIT_STATVALUE_T AS TABLE(<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 495

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

Saved successfully!

Ooh no, something went wrong!