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

Mehei/otherinferences #203

Merged
merged 28 commits into from
Feb 15, 2020
Merged

Mehei/otherinferences #203

merged 28 commits into from
Feb 15, 2020

Conversation

heimengqi
Copy link
Contributor

add other inferences functionalities for non bootstrap case.

@heimengqi heimengqi marked this pull request as ready for review December 27, 2019 21:31
@heimengqi heimengqi added the enhancement New feature or request label Jan 8, 2020
Copy link
Collaborator

@kbattocchi kbattocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good; I haven't reviewed the notebooks yet.

setup.cfg Outdated Show resolved Hide resolved
econml/utilities.py Outdated Show resolved Hide resolved
econml/utilities.py Outdated Show resolved Hide resolved
econml/utilities.py Outdated Show resolved Hide resolved
econml/tests/test_drlearner.py Outdated Show resolved Hide resolved
econml/inference.py Show resolved Hide resolved
econml/inference.py Outdated Show resolved Hide resolved
econml/inference.py Show resolved Hide resolved
econml/inference.py Outdated Show resolved Hide resolved
econml/inference.py Show resolved Hide resolved
Copy link
Collaborator

@kbattocchi kbattocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I've added a few comments but once those are addressed this can be merged in.

econml/cate_estimator.py Show resolved Hide resolved
econml/cate_estimator.py Show resolved Hide resolved
econml/inference.py Outdated Show resolved Hide resolved
econml/inference.py Outdated Show resolved Hide resolved
coef_title = 'Coefficient Results'
smry.add_table(coef_array, coef_headers, coef_stubs, coef_title)
except Exception as e:
print("Coefficient Results: ", str(e))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular exception you expect to be thrown here? Why is it okay to just continue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If X is None, there is not coefficient to return but we can still return intercept inference. Similarly, if cate_fit_intercept is False, we could only output coefficient inference.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see - in that case, it seems like it would be better to explicitly check for those conditions rather than catching any exception and proceeding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there are multiple possibilities that we couldn't output intercept inference or coef inference or both of them, like user might input an unseen T1 or input T1 the same as control, should I check all of them one by one? I would probably leave it for today beta release and polish it later, I think we still have a lot of other properties we could output under this summary function.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to postpone, that's fine with me. However, I think it's usually useful to differentiate between things failing for reasons that you know about (e.g. there is no X and that's fine) as opposed to unexpected reasons (e.g. something has the wrong shape inside of coef__inference due to a bug in our logic and we throw an exception which we would want to bubble up, but we swallow the exception here and never notice).

econml/tests/test_dml.py Outdated Show resolved Hide resolved
econml/tests/test_dml.py Outdated Show resolved Hide resolved
econml/tests/test_dml.py Outdated Show resolved Hide resolved
@@ -1,712 +1,804 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why the GitHub diff shows the whole file as changing? I can't really review it in this format...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like maybe a problem with the line endings... See if you can keep your changes but revert to Unix-style line endings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I committed, there was a conflict on this file because of the update on master. I used the web interface to solve and conflict and for some reason github identified the whole file has been changed...I compared the two file adding my changes without changing anything for the current file on master. Don't know exactly how to recover the previous version, please help here if we should go back to the previous master version to make sure everything is unchanged and add my stuff again.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you make any trivial change to this file (e.g. add or remove a blank line at the end of the file) on your own machine and commit it then all of the line endings will be fixed automatically.

econml/utilities.py Outdated Show resolved Hide resolved
@heimengqi heimengqi merged commit f42251e into master Feb 15, 2020
@kbattocchi kbattocchi deleted the mehei/otherinferences branch March 6, 2020 16:41
@kbattocchi kbattocchi restored the mehei/otherinferences branch March 6, 2020 16:42
@kbattocchi kbattocchi deleted the mehei/otherinferences branch March 6, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants