Skip to content

[MNT] Replace validate_data with check_array in predict methods#561

Open
TheGreatPratyush wants to merge 2 commits into
gc-os-ai:mainfrom
TheGreatPratyush:fix-classifier-dtype
Open

[MNT] Replace validate_data with check_array in predict methods#561
TheGreatPratyush wants to merge 2 commits into
gc-os-ai:mainfrom
TheGreatPratyush:fix-classifier-dtype

Conversation

@TheGreatPratyush

Copy link
Copy Markdown

Reference Issues/PRs

N/A

What does this implement/fix? Explain your changes.

This PR replaces validate_data with check_array in the predict, predict_proba, and regressor predict methods.

This makes the input validation in prediction steps more consistent with how sklearn typically handles it.

What should a reviewer concentrate their feedback on?

  • Whether using check_array instead of validate_data in prediction methods is appropriate
  • Any potential impact on existing prediction behavior

Did you add any tests for the change?

No additional tests were added. The changes were verified by running the classifier and ensuring predictions work as expected.

Any other comments?

This is a small cleanup to make the prediction methods follow sklearn conventions more closely.

PR checklist

  • The PR title starts with [MNT]
  • Added/modified tests
  • Used pre-commit hooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant