causalml icon indicating copy to clipboard operation
causalml copied to clipboard

Qini Score

Open evamoosbrugger opened this issue 4 years ago • 4 comments

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

evamoosbrugger avatar Jun 01 '21 11:06 evamoosbrugger

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 avatar Jun 01 '21 16:06 ppstacy

@ppstacy I tried using that function, I think it returns pandas.DataFrame with model qini, actual and random right?

manojbalaji1 avatar Jun 02 '21 12:06 manojbalaji1

@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! 😊

evamoosbrugger avatar Jun 04 '21 13:06 evamoosbrugger

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?

valeria-io avatar Nov 26 '21 15:11 valeria-io

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.

vincewu51 avatar Aug 19 '23 01:08 vincewu51