causalml
causalml copied to clipboard
Qini Score
Hello, I have a question regarding the output of the qini_score function: I expected to receive one float as output as it is written in the description of the function("Returns: (float): the Qini score"). But I receive two floats as output called “predicted_uplift” and “Random”. So what are these two floats exactly? Can you explain this a little bit further? And do I have to calculate the difference between them in order to get the Qini Score?
Thanks for your help! Eva
Hi @evamoosbrugger, thanks for rising it here. This function will return two output one for Random which is the Qini score for random targeting without any model and one of the model estimates. We will update the function description to make it more clear. Hope this makes sense for you.
@ppstacy I tried using that function, I think it returns pandas.DataFrame with model qini, actual and random right?
@ppstacy, thanks for your reply! So when I understand you correctly, then the output I get as “predicted_uplift” represents the ratio of the area above the diagonal of the actual curve to the corresponding area above the diagonal of the optimum curve (as described in Radcliffe 2007). Is this correct? Because your description only states “the area between the Qini curves” – so it is unclear if it is a ratio. Thank you! 😊
I looked at the function's code and it seems to return the difference (qini.sum(axis=0) - qini[RANDOM_COL].sum()) / qini.shape[0]. However, I think it needs to be ratio, so that the range does not go to far away from -1 and 1 as described by Radcliffe 2007.
Is that correct?
Qini Score implemented is the differences between the Qc of the model and the Qc of random. It is not Q or q0 in Radcliffe 2007. A detailed explanation is in section 4.3 of the paper. Feel to re-open is you have further questions.