-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CoxPH: NPE instead of a params validation error #8146
Comments
Jan Sterba commented: this is caused by {{"surv_days"}} missing from the training dataset, the fact that this causes a NPE is a bug in deed that we need to fix |
Gregory Kanevsky commented: NPE also happens when {{start_column }} doesn’t exist. |
Gregory Kanevsky commented: When covariates are not numeric or factors the following error reported: {quote}java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 Error: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 we would benefit from more explicit message indicating that features (covariates) must be numeric or factors. |
Jan Sterba commented: added missing validation and improved the error messages |
JIRA Issue Migration Info Jira Issue: PUBDEV-7492 Linked PRs from JIRA Attachments From Jira Attachment Name: dallas_shelter_survdata_FY18-20.csv.gz Attachment Name: h2o_127.0.0.1_54321-3-info.log Attachment Name: h2o_127.0.0.1_54321-5-error.log |
getting NPE when running Cox PH model
use data file:
[^dallas_shelter_survdata_FY18-20.csv.gz]
{code:r}library(data.table)
survdata = fread("dallas_shelter_survdata_FY18-20.csv.gz")
coxph_features = c("chip_status", "surv_hours", "event")
survdata.hex = as.h2o(survdata[, ..coxph_features])
survdata.hex$event = as.factor(survdata.hex$event)
survdata.hex$chip_status = as.factor(survdata.hex$chip_status)
survdata.coxph = h2o.coxph(model_id = "Dallas-animal-shelter-coxph-model",
training_frame = survdata.hex,
stop_column = "surv_days",
event_column = "event"){code}
getting error:
[^h2o_127.0.0.1_54321-5-error.log]
[^h2o_127.0.0.1_54321-3-info.log]
The text was updated successfully, but these errors were encountered: