Update detect_problem_types implementation - #1476
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1476 +/- ##
=========================================
+ Coverage 100.0% 100.0% +0.1%
=========================================
Files 223 223
Lines 15019 15024 +5
=========================================
+ Hits 15012 15017 +5
Misses 7 7
Continue to review full report at Codecov.
|
bchen1116
marked this pull request as ready for review
November 30, 2020 18:17
bchen1116
requested review from
angela97lin,
christopherbunn,
dsherry,
eccabay,
freddyaboulton and
jeremyliweishih
and removed request for
angela97lin and
dsherry
November 30, 2020 18:18
jeremyliweishih
approved these changes
Nov 30, 2020
jeremyliweishih
left a comment
Collaborator
There was a problem hiding this comment.
good catch! LGTM
freddyaboulton
approved these changes
Nov 30, 2020
freddyaboulton
left a comment
Contributor
There was a problem hiding this comment.
@bchen1116 This looks good to me!
dsherry
reviewed
Nov 30, 2020
| if num_classes == 2: | ||
| return ProblemTypes.BINARY | ||
| if y.dtype in numeric_dtypes: | ||
| if is_numeric_dtype(y.dtype): |
Contributor
There was a problem hiding this comment.
Got it, thanks @bchen1116 !
I think the ultimate goal is to update this (and all our utilities) to standardize to woodwork (#1229 ) and then check if the "numeric" semantic tag has been applied to the target. (@angela97lin FYI)
dsherry
reviewed
Nov 30, 2020
Merged
This file contains hidden or 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
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.
fix #1469
Updated this implementation to catch Int64 dtypes. Previously, using
analyze_metadatain looking_glass, if the target data wasInt64, the problem_type would be classified as multiclass as long as there were>2unique values.After using

is_numeric_dtype:Since we drop NaN data, classifying Boolean (nullable) as a numeric dtype is ok, since we'll catch this binary case before determining if it is regression or multiclass.