Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions regarding DRPolicyForest results #874

Open
lee-uidam opened this issue Apr 9, 2024 · 2 comments
Open

Questions regarding DRPolicyForest results #874

lee-uidam opened this issue Apr 9, 2024 · 2 comments

Comments

@lee-uidam
Copy link

lee-uidam commented Apr 9, 2024

Hi, thanks for the great ci library.
I'm using DRPolicyForest and facing some issue.

스크린샷 2024-04-09 오후 5 57 51

model = DRPolicyForest(...)

Question 1: model's predict_value() and predict_proba() are returning different rankings between treatments.

  • for example, predict_value() for T2 is higher for some records, but predict_proba() for T1 is higher.

I thought they return the same rankings (order of magnitude), but they aren't.
How should I interpret this?

Question 2: model's predict() method returns zero values for Treatment=0 (control). However, if I draw a plot, model.plot(), there is a None Treatment(T=0) leaf with numerous samples.
Why do they return different results?

@kbattocchi
Copy link
Collaborator

If you could provide a concrete reproduction of your issues that might help narrow down any issues, but here are a few thoughts.

For question 1, predict_proba gives the fraction of trees in the forest recommending the treatment while predict_value gives the average estimate; usually these would be ranked fairly consistently but that's not necessarily the case. For instance, it's possible that a small number of trees predict a very high value for T2, so that the overall average prediction is higher than that for T1, but the majority of trees predict a higher value for T1, so that gets a higher ranking in predict_proba.

For question 2, if you're plotting a single tree from the forest, then it might make sense that that tree assigns treatment 0 to some instance, but that most trees assign some other treatment, so 0 is never recommended by the forest overall.

@lee-uidam
Copy link
Author

Thanks @kbattocchi,
I cannot share the code for some issues, but your answer helped a lot !
now I understand the differences btw those methods :) and now I see why they returned somewhat seemingly different results.

(I'll close the issue in a few days in case anyone wants to add some comment )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants