-
Notifications
You must be signed in to change notification settings - Fork 75
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
initial multiclass support - take 2 #279
Conversation
WalkthroughThe updates encompass several areas: restructuring the default task sequence in the Changes
Sequence Diagram(s)Silently ignoring as generating the diagram doesn’t make sense because the changes are too simple, too varied, etc. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (6)
tests/testthat/test-multiclass.R (3)
6-11
: Ensure reproducibility by setting a seed.Consider setting a random seed to ensure reproducibility of the results.
set.seed(123)
19-19
: Consider adding assertions for thecaretStack
object.Add assertions to check the structure and attributes of the
caretStack
object.expect_is(ens, "caretStack")
25-27
: Verify the structure of the probability predictions.The test currently checks the type and length of the probability predictions. Consider adding checks for the structure and names of the columns.
expect_true(is.matrix(p)) expect_equal(ncol(p), length(levels(iris$Species))) expect_equal(colnames(p), levels(iris$Species))R/helper_functions.R (3)
100-100
: Clarify the TODO comment.The TODO comment should specify the exact check needed for the
savePredictions
parameter.# TODO: Add a check that if `model$pred` is null, ensure `savePredictions` was set to "final" in the trainControl.
102-102
: Clarify the TODO comment.The TODO comment should specify the exact check needed for models having null values.
# TODO: Add a check for any models having null values in their predictions.
322-322
: Clarify the TODO comment.The TODO comment should specify the need to use all class probabilities for multiclass models.
# TODO: For multiclass, use all class probabilities instead of just the positive class probabilities.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- Makefile (1 hunks)
- R/helper_functions.R (2 hunks)
- tests/testthat/test-helper_functions.R (1 hunks)
- tests/testthat/test-multiclass.R (1 hunks)
Files skipped from review due to trivial changes (1)
- Makefile
Additional comments not posted (2)
tests/testthat/test-multiclass.R (1)
2-2
: Good context description for the test.The context string clearly defines the purpose of the test, which is to verify the functionality of
caretList
andcaretStack
for multiclass problems.tests/testthat/test-helper_functions.R (1)
32-32
: Good use ofcheck_caretList_model_types
.The call to
check_caretList_model_types
ensures that the models are validated correctly.
Actually, I was able to rebase #191 |
rebased #191 off main, seems good now!
Initial working version of multiclass ensembling. Work to be done: