Open
Conversation
prdai
reviewed
May 28, 2024
There was a problem hiding this comment.
Pull request overview
This pull request updates the documentation to rename validation-related parameter names (X_val, y_val) to test-related parameter names (X_test, y_test) in custom metric function examples.
Changes:
- Updated parameter names from
X_valandy_valtoX_testandy_testin two custom metric function signature examples - Updated usage of these renamed parameters within the function body example
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| val_loss = log_loss(y_val, y_pred, labels=labels, sample_weight=weight_val) | ||
| y_pred = estimator.predict_proba(X_test) | ||
| pred_time = (time.time() - start) / len(X_test) | ||
| val_loss = log_loss(y_test, y_pred, labels=labels, sample_weight=weight_val) |
There was a problem hiding this comment.
The variable weight_val should be renamed to weight_test to maintain consistency with the renaming of X_val to X_test and y_val to y_test. The current code is using a parameter that should have been renamed along with the other validation-related variables.
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.
Why are these changes needed?
Related issue number
Checks