IDAX.MAE - Calculate the mean absolute error of regression predictions
Use this stored procedure to calculate the mean absolute error of regression predictions. For the calculation, the predictions that are made when a regression model is applied on data are compared to the real values of this data.
Note: This feature is available starting from Db2®
version 11.5.4.
Authorization
The privileges held by the authorization ID of the statement must include the IDAX_USER role.
Syntax
IDAX.MAE(in parameter_string varchar(32672))
Parameter descriptions
- parameter_string
- Mandatory one-string parameter that contains pairs of <parameter>=<value> entries that are separated by a comma.
Returned information
DOUBLE the mean absolute error as a result set.
Example
CALL IDAX.SPLIT_DATA('intable=samples.customer_churn,traintable=cust_train,testtable=cust_test,id=cust_id,fraction=0.30');
CALL IDAX.GROW_REGTREE('model=cust_rt, intable=cust_train, id=cust_id, target=duration, minsplit=2');
CALL IDAX.PREDICT_REGTREE('model=cust_rt, intable=cust_test, outtable=cust_rt_out');
CALL IDAX.MAE('intable=cust_test,id=cust_id,target=duration,resulttable=cust_rt_out');