Skip to content

improve input processing for StatsModelsLinearRegression#599

Merged
kbattocchi merged 3 commits intomainfrom
fverac/ImproveStatsModelsInputChecking
Apr 6, 2022
Merged

improve input processing for StatsModelsLinearRegression#599
kbattocchi merged 3 commits intomainfrom
fverac/ImproveStatsModelsInputChecking

Conversation

@fverac
Copy link
Copy Markdown
Collaborator

@fverac fverac commented Apr 4, 2022

No description provided.

@fverac fverac requested a review from kbattocchi April 4, 2022 19:39
Copy link
Copy Markdown
Member

@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, but please add a test (you can probably just take the repro in #185 and just verify that the point estimates are the same to within a small tolerance for both the sklearn LinearRegression model and ours).

Comment thread econml/utilities.py


def check_input_arrays(*args, validate_len=True, force_all_finite=True):
def check_input_arrays(*args, validate_len=True, force_all_finite=True, dtype=None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a good way to address the issue.

Copy link
Copy Markdown
Member

@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'll rebase on top of main once the test stability fixes are in.

@kbattocchi kbattocchi force-pushed the fverac/ImproveStatsModelsInputChecking branch from 401cf37 to 3d4c29a Compare April 6, 2022 15:28
@kbattocchi kbattocchi marked this pull request as ready for review April 6, 2022 19:50
@kbattocchi kbattocchi merged commit 493f7cd into main Apr 6, 2022
@kbattocchi kbattocchi deleted the fverac/ImproveStatsModelsInputChecking branch April 6, 2022 19:51
@fverac fverac linked an issue Apr 12, 2022 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

StatsModelsLinearRegression needs check_input

2 participants