uber / causalml

Uplift modeling and causal inference with machine learning algorithms
Other
4.87k stars 756 forks source link

fix #771 and add a test for get/plot_tmlegain() #773

Closed jeongyoonlee closed 1 month ago

jeongyoonlee commented 1 month ago

Proposed changes

This PR fixes #771 by using df[col].rank(method='first') to break ties. A test is added for plot_tmlegain().

Types of changes

What types of changes does your code introduce to CausalML? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

N/A

jeongyoonlee commented 1 month ago

LGTM 👍

Would you mind approving it? ;)