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
Make get_prediction_vs_actual_data()
a public method
#1553
Conversation
2a23252
to
9969dd0
Compare
Codecov Report
@@ Coverage Diff @@
## main #1553 +/- ##
=========================================
+ Coverage 100.0% 100.0% +0.1%
=========================================
Files 234 234
Lines 16803 16827 +24
=========================================
+ Hits 16795 16819 +24
Misses 8 8
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christopherbunn I think this is good to merge!
def _get_prediction_vs_actual_data(y_true, y_pred, outlier_threshold): | ||
"""Helper method to help calculate the y_true and y_pred dataframe, with a column for outliers""" | ||
def get_prediction_vs_actual_data(y_true, y_pred, outlier_threshold=None): | ||
"""Combines y_true and y_pred into a single dataframe and adds a column for outliers. Used in `graph_prediction_vs_actual()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice docstring!
evalml/model_understanding/graphs.py
Outdated
y_true (pd.Series): The real target values of the data | ||
y_pred (pd.Series): The predicted values outputted by the regression model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like from impl that woodwork is supported too? Could you update docstr / tests? Otherwise I can wait for this to be merged and add it to a PR of mine too hehe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I can add it to this PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, thank you!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!! Thanks for this
Looks like one of the windows checks threw an internal pytest error. Since the other two windows checks passed and the particular failed test passed after rerunning I think it's a one-off error. |
c46fd27
to
dd887eb
Compare
dd887eb
to
8bf755d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christopherbunn this is excellent!
Made
get_prediction_vs_actual_data()
a public method, added a check foroutlier_threshold
, and added it to API documentation.Resolves #1542