-
Notifications
You must be signed in to change notification settings - Fork 166
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
Causal Effect Bin Partitioners #216
Open
HectorLira
wants to merge
13
commits into
nubank:master
Choose a base branch
from
MarianaBlaz:causal-effect-bin-partitioners
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Causal Effect Bin Partitioners #216
HectorLira
wants to merge
13
commits into
nubank:master
from
MarianaBlaz:causal-effect-bin-partitioners
+67
−11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…az/fklearn into causal-effect-bin-partitioners
Codecov Report
@@ Coverage Diff @@
## master #216 +/- ##
==========================================
- Coverage 94.69% 94.36% -0.33%
==========================================
Files 25 35 +10
Lines 1507 2131 +624
Branches 203 280 +77
==========================================
+ Hits 1427 2011 +584
- Misses 48 83 +35
- Partials 32 37 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
READY
Todo list
Background context
To calculate causal effects by segments a quantile-based approach is used to create the segments. However, we've seen that this is usually not the ideal way to create them as there are methods that create segments that are more distinguishable between one another.
One such example is the Fisher-Jenks algorithm. A user could create its own partitioner with this algorithm like this:
And use it in
effect_by_segment
:Or use another custom partitioner such as:
Description of the changes proposed in the pull request
We're adding:
effect_by_segment
function so a user can define the way the segments are created.quantile_partitioner
so the default behavior ofeffect_by_segment
is maintained.PartitionFnType
type.quantile_partitioner
fklearn.causal.partitioners
moduleRelated PRs
NA
Where should the reviewer start?
At the modifications we did in
effect_by_segment
and then to thequantile_partitioner
definition.Remaining problems or questions
We are not creating additional partitioners to the ones used by default because this would require more complex definitions or imports on new libraries (such as the Fisher-Jenks algorithm).