myui/hivemall

Add R2 UDAF

Closed this issue · 5 comments

myui commented

@y-ken Hive macro CANNOT contain any UDAF. So, we need to create UDAF for R2 computation as we do so for mae/mse/rmse.
https://github.com/myui/hivemall/blob/master/core/src/main/java/hivemall/evaluation/MeanSquaredErrorUDAF.java

@myui I am interested and might be able to help with this. Note, I didn't find any tests for any of the code in evaluation package. Are there?

myui commented

@ArnabRaxit Thank you for the help. Pull request is welcome.

R2 can be computed by SQL as seen in the following link but better to provide R2 UDAF.
https://github.com/myui/hivemall/wiki/Statistical-evaluation-of-a-prediction-model

You can find implementations of other evaluation metrics for reference in
https://github.com/myui/hivemall/tree/master/core/src/main/java/hivemall/evaluation

I did not created unit tests for them. Put unit tests on core/src/test/java/hivemall/evaluation if possible.

myui commented

Merged PR. Will be included from v0.4.1-alpha.6.
#268