laresbernardo / lares

Analytics & Machine Learning R Sidekick
https://laresbernardo.github.io/lares/
233 stars 49 forks source link

Error in `dplyr::filter()`: #43

Closed ms1948 closed 1 year ago

ms1948 commented 1 year ago

When I run the command: r <- h2o_automl(df, y = BG, max_models = 1, impute = FALSE, target = "C3") the SELECTED MODEL: XGBoost_1_AutoML_4_20230324_103413 produces the following error msg: Error in dplyr::filter(): ℹ In argument: .data$importance < 1/(nrow(imp) * 4). Caused by error in .data$importance: ! Column importance not found in .data.

laresbernardo commented 1 year ago

Hi @ms1948 I can't seem to be able to replicate your issue with the dft dataset and a dummy example. Can you please share a reproducible example?

ms1948 commented 1 year ago

library(lares) library(gdata) rm(list=ls()) a=read.xls("file.xls") names(a) b=data.frame(a[2:27]) r=lares::h2o_automl(b, y = CAT_C3, max_models = 1, impute = FALSE, target = "CAT", scale = TRUE, start_clean=TRUE, alarm = TRUE)

file.xls

laresbernardo commented 1 year ago

Thanks, I was able to replicate this issue. I'm getting the following error because h2o doesn't provide an varimp result for this model.

h2o.varimp(m)
Warning message:
This model doesn't have variable importances 

Will add a logic to not crash but simply skip this result when this happens.

ms1948 commented 1 year ago

Ok. Thanks.

laresbernardo commented 1 year ago

I've just updated the dev version. Please, update with lares::updateLares(), restart your R session, and retry. Close this ticket once you validate it's running correctly on your end.

ms1948 commented 1 year ago

Ok, it works. Thanks.