-
Notifications
You must be signed in to change notification settings - Fork 397
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
Refactored splitter tests #176
Conversation
Codecov Report
@@ Coverage Diff @@
## master #176 +/- ##
==========================================
- Coverage 86.31% 82.35% -3.97%
==========================================
Files 305 305
Lines 9977 9976 -1
Branches 342 547 +205
==========================================
- Hits 8612 8216 -396
- Misses 1365 1760 +395
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.
Minor comments, o/w looks good to me!
|
||
Spec[OpCrossValidation[_, _]] should "stratify binary class data" in { | ||
val splits = cv.createTrainValidationSplits(condition, binaryDS, label.name, balancer) | ||
val balancer = new DataBalancer() | ||
val splits = cv.createTrainValidationSplits(cvStratifyCondition, binaryDS, label.name, Some(balancer)) |
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.
Minor comment: use Option
} | ||
|
||
it should "stratify multi class data" in { | ||
val splits = ts.createTrainValidationSplits(condition, multiDS, multiLabel.name, cutter) | ||
val splits = ts.createTrainValidationSplits(tsStratifyCondition, multiDS, multiLabel.name, Some(new DataCutter())) |
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.
Same
Spec[OpTrainValidationSplit[_, _]] should "stratify binary class data" in { | ||
val splits = ts.createTrainValidationSplits(condition, binaryDS, label.name, balancer) | ||
val balancer = new DataBalancer() | ||
val splits = ts.createTrainValidationSplits(tsStratifyCondition, binaryDS, label.name, Some(balancer)) |
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.
Same
} | ||
|
||
it should "stratify multi class data" in { | ||
val splits = cv.createTrainValidationSplits(condition, multiDS, multiLabel.name, cutter) | ||
val splits = cv.createTrainValidationSplits(cvStratifyCondition, multiDS, multiLabel.name, Some(new DataCutter())) |
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.
Same
stratifyCondition: Boolean, | ||
dataset: Dataset[T], | ||
label: String, | ||
splitter: Option[Splitter] |
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.
No default?
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.
nope, it's a private abstract method,
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Matthew Tovbin <m***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
Related issues
Test code was too repetitive and was not testing splitter summary correctly.
Describe the proposed solution
SplitterSummaryAsserts
for assertingSplitterSummary
classesDataCutter
,DataSplitter
,DataBalancer
andOpValidator
to useSplitterSummaryAsserts
Describe alternatives you've considered
NA
Additional context
TBD - also needs checks & tests for empty datasets - #161