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.

3.6.4 Inter-Quartile Range Test<br />

Given a series of numeric data, the inter-quartile range (IQR) is the difference between the third quartile (Q3)<br />

and the first quartile (Q1) of the data.<br />

IQR = Q3 – Q1<br />

Q1 is equal to 25th percentile and Q3 is equal to 75th percentile.<br />

The p-th percentile of a numeric vector is a number, which is greater than or equal to p% of all the values of<br />

this numeric vector.<br />

IQR Test is a method to test the outliers of a series of numeric data. The algorithm performs the following<br />

tasks:<br />

1. Calculates Q1, Q3, and IQR.<br />

2. Set upper and lower bounds as follows:<br />

Upper-bound = Q3 + 1.5 × IQR<br />

Lower-bound = Q1 – 1.5 × IQR<br />

3. Tests all the values of a numeric vector to determine if it is in the range. The value outside the range is<br />

marked as an outlier, meaning it does not pass the IQR test.<br />

Prerequisites<br />

The input data does not contain null value.<br />

IQRTEST<br />

This function performs the inter-quartile range test and outputs the test results.<br />

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