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.

If an attribute is of category type, it will be converted to a binary vector and then be used as a numerical<br />

attribute. For example, in the below table, "Gender" is of category type.<br />

Table 56:<br />

Customer ID Age Income Gender<br />

T1 31 10,000 Female<br />

T2 27 8,000 Male<br />

Because "Gender" has two distinct values, it will be converted into a binary vector with two dimensions:<br />

Table 57:<br />

Customer ID Age Income Gender_1 Gender_2<br />

T1 31 10,000 0 1<br />

T2 27 8,000 1 0<br />

Thus, the Euclidean distance between T1 and T2 is:<br />

Where γ is the weight to be given to the transposed categorical attributes to lessen the impact on the<br />

clustering from the 0/1 attributes. Then you can use the traditional method to update the medoid of every<br />

cluster.<br />

Prerequisites<br />

●<br />

●<br />

The input data contains an ID column and the other columns are of integer, varchar, nvarchar, or double<br />

data type.<br />

The input data does not contain null value. The algorithm will issue errors when encountering null values.<br />

KMEDOIDS<br />

This is a clustering function using the K-medoids algorithm.<br />

Procedure Generation<br />

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE (‘AFL<strong>PAL</strong>’, ‘KMEDOIDS’,<br />

‘’, '', );<br />

The signature table should contain the following records:<br />

Table 58:<br />

Position Schema Name Table Type Name Parameter Type<br />

1 IN<br />

2 IN<br />

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