Professional Documents
Culture Documents
- SAP Community
After executing this code we should see a new procedure in the _SYS_AFL schema called PAL_KMEANS_TELCO
I generated the K-Means procedure so now I need to write the code that will execute it:
"INTARGS" INTEGER,
"DOUBLEARGS" DOUBLE,
);
INSERT INTO PAL_CONTROL_TAB_TELCO VALUES ('INIT_TYPE',4,null,null); --> This parameter will specify how to
select the initial center of each cluster
INSERT INTO PAL_CONTROL_TAB_TELCO VALUES ('DISTANCE_LEVEL',2,null,null); --> Which distance to use. In this
case I'm using Euclidean
INSERT INTO PAL_CONTROL_TAB_TELCO VALUES ('NORMALIZATION',0,null,null); --> How to normalize the data. In
this case I'm not normalizing at all
assignment for each customer and the distance to the center of the cluster */
"ID" INT,
"CENTER_ASSIGN" INT,
"DISTANCE" DOUBLE,
primary key("ID")
);
/* This table will contain the resulting centers for each cluster */