Add input validation for Friedman-Popescu H statistic calculation#16760
Open
Add input validation for Friedman-Popescu H statistic calculation#16760
Conversation
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve input validation for H statistic
Add input validation for Friedman-Popescu H statistic calculation
Feb 4, 2026
maurever
requested changes
Apr 14, 2026
Contributor
maurever
left a comment
There was a problem hiding this comment.
R and Python tests are missing.
Agent-Logs-Url: https://github.com/h2oai/h2o-3/sessions/832aaf6a-935f-45c8-9ea7-714da906f754 Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Contributor
Author
Added Python and R tests for input validation in commit 3365711. Python test:
R tests:
All tests verify proper error messages for invalid input and correct behavior for valid input. |
|
maurever
approved these changes
Apr 21, 2026
Contributor
maurever
left a comment
There was a problem hiding this comment.
LGTM. @tomasfryda or @valenad1, could you review this PR, please?
valenad1
requested changes
Apr 21, 2026
Collaborator
valenad1
left a comment
There was a problem hiding this comment.
It should go to rel-3.46.0 if you want it in next release and fix check pull request test stage please. :)
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.



getFriedmanPopescusH()throws NPE when called with non-numeric or non-existent column names. The error occurs inFriedmanPopescusH.filterFrame()whenframe.vecs(cols)returns null for invalid columns.Changes
Added default validation method in
FriedmanPopescusHCollectorinterfacevarsis non-null and non-emptyUpdated implementations to call validation before processing
GBMModel.getFriedmanPopescusH()XGBoostModel.getFriedmanPopescusH()Added comprehensive test coverage
GBMTest.testFriedmanPopescusHInputValidation()pyunit_h_input_validation.py(tests both GBM and XGBoost)runit_GBM_h_statistic_input_validation.Randrunit_XGBoost_h_statistic_input_validation.RError messages now clearly indicate the issue:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.