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>_DISTRFITCENSORED_DATA_TBL VALUES (16,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (20,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (24,24);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (24,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (27,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (32,32);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (34,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (36,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (36,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (44,NULL);<br />

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

CREATE 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 ('DISTRIBUTIONNAME', NULL, NULL,'WEIBULL');<br />

INSERT INTO <strong>PAL</strong>_CONTROL_TBL VALUES ('OPTIMAL_METHOD',0, NULL, NULL);<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRFITCENSORED_ESTIMATION_TBL LIKE<br />

<strong>PAL</strong>_DISTRFITCENSORED_ESTIMATION_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRFITCENSORED_STATISTICS_TBL LIKE<br />

<strong>PAL</strong>_DISTRFITCENSORED_STATISTICS_T;<br />

CALL DM_<strong>PAL</strong>.<strong>PAL</strong>_DISTRFITCENSORED_PROC(<strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL,<br />

<strong>PAL</strong>_CONTROL_TBL, <strong>PAL</strong>_DISTRFITCENSORED_ESTIMATION_TBL,<br />

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

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

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

The expected results are as follows:<br />

Step 2<br />

Get Weibull distribution and statistics from the control treatment data:<br />

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

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

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

"LEFT" DOUBLE,<br />

"RIGHT" DOUBLE<br />

);<br />

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

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

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

"INTARGS" INTEGER,<br />

"DOUBLEARGS" DOUBLE,<br />

"STRINGARGS" VARCHAR (100)<br />

);<br />

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

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

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

"VALUE" VARCHAR(50)<br />

);<br />

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

End-to-End Scenarios P U B L I C 571

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

Saved successfully!

Ooh no, something went wrong!