cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

APL Classification Documentation inconsistency

0 Likes
522

Hi Experts,

we are currently trying to use the APL and compare it to other predictive tools offered around SAP context. We successfully got the forecast algorithms to run and are currently stuck with the binary classification. Our use-case is a customer churn prediction. We moved hand over hand on the example scripts offered by SAP. We got to the point our results are created, with the columns 'Customer_ID' as our identifier column, 'Contract' as our target column and 'rr_Contract' as our prediction column.
Now to the problem we encountered. As stated in the developer guide on page 275 the rr_<target> is supposed to be of the same SQL Type as our target, but every example given (e.g. page 64) does not follow that rule. So in our case our target 'Contract' is of Type NVCHAR with the values 'active' and 'churned' but declaring 'rr_Contract' as NVCHAR ends in an error. However when we declare it as DOUBLE no error emerges and our column is filled with values rangin from somewhat like -1.5 to 1.5.
Is the rr_<target> intended to be of Type DOUBLE and if so how are the results to be interpretated?

Greetings

Laurin

Accepted Solutions (1)

Accepted Solutions (1)

marc_daniau
Product and Topic Expert
Product and Topic Expert
0 Likes

You are right, the rr_<target> is of type double. We will make the change to the APL guide. Thanks for pointing it out.

With the function GET_TABLE_TYPE_FOR_APPLY one can obtain automatically the structure of the prediction table for a given configuration.
https://help.sap.com/viewer/7223667230cb471ea916200712a9c682/2018/en-US/6a077f3c6fea4cc7835a99ce6c6d...
and then create the prediction table using the function CREATE_TABLE_FROM_TABLE_TYPE
https://help.sap.com/viewer/7223667230cb471ea916200712a9c682/2018/en-US/bfcdedeffdd7419d8df7c1571e13...

In case of a continuous target like House_Price, rr_<target> is the predicted value expressed in the unit of the target (e.g. euros) ; in case of a nominal target like Churn_Yes/No, rr_<target> is a score without unit, it is not interpretable ; however it can be used to sort and filter the customers who have the highest scores (the more likely to churn) and take action (e.g. making a call) for the top say, 50 customers.

marc_daniau
Product and Topic Expert
Product and Topic Expert
0 Likes

You may want to try the Gradient Boosting classification we introduced recently in APL.

https://blogs.sap.com/2020/07/27/hands-on-tutorial-automated-predictive-apl-in-sap-hana-cloud/

Answers (0)