Skip to content

Conversation

@rafijacSense
Copy link

Why are these changes needed?

Related issue number

Checks

Copy link
Contributor

@prdai prdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I know why you changed the X_val, y_val be switched to X_test, y_test?

@thinkall thinkall added the need more info Can't address without more information label Jul 23, 2024
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_val and y_val to X_test and y_test in 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)
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need more info Can't address without more information

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants