easystats / insight

:crystal_ball: Easy access to model information for various model objects
https://easystats.github.io/insight/
GNU General Public License v3.0
380 stars 38 forks source link

Support for h2o #292

Open laresbernardo opened 3 years ago

laresbernardo commented 3 years ago

Hi! Great package. Thanks for sharing! Are you planning to add support to h2o models and framework? Would be very useful to have them included. Cheers.

strengejacke commented 3 years ago

There was an issue (https://github.com/easystats/insight/issues/48), which was closed, because there came no further feedback. I have too little experience with such models, so I can't promise. Maybe you could response to some of my questions in the closed issue here?

laresbernardo commented 3 years ago

Hi!! Thanks for reaching back so quickly @strengejacke

Glad to share a reproducible example. To give you a bit more context, I do have similar functions in my lares package to extract insights out of these h2o objects to calculate metrics, plots, etc. Feel free to check it out and I'm sure it'll be helpful to better understand their WOW.

Here are 3 reproducible examples (binomial classification, multi-categorical classification, and regression) using h2o_automl(). The outputs are lists with a bunch of insights and useful stuff which use h2o_results() underneath to translate everything out (as insights does). After transforming these outputs, you can use any of the other lares functions easily with the tags/score(/multis) parameters.

DominiqueMakowski commented 3 years ago

cool package you have! Indeed h2o's support is something that has been around for some time, but because we've very unfamiliar with it, we don't really know where to start.

unfortunately, my help ends here, as I didn't even manage to "initialize" h2o on my machine 😬

m <- lares::h2o_automl(iris, y = "Sepal.Length", x = c("Petal.Length", "Sepal.Width"))
#> 2021-02-01 22:25:58 | Started process...
#> Error in value[[3L]](cond): You have a 32-bit version of Java. H2O works best with 64-bit Java.
#> Please download the latest Java SE JDK from the following URL:
#> https://www.oracle.com/technetwork/java/javase/downloads/index.html
#> Process duration: 2.25s

Created on 2021-02-01 by the reprex package (v0.3.0)

laresbernardo commented 3 years ago

Oh no! Windows? I guess that you could follow their recommendations and you'll be able to use it. I see huge advantages on using this package as it is super fast, easy to deploy in production environments, quite flexible, great autoML logic behind, and "usually" easy to use... Hope you and your team could reconsider adding h2o support as insights seems to be an awesome package as well.

And the correct use of the function would be something like:

m <- lares::h2o_automl(iris, y = "Sepal.Length", ignore = c("Species","Petal.Width"))

OR

m <- dplyr::select(iris, Sepal.Length, Sepal.Width, Petal.Length) %>% lares::h2o_automl(iris, y = "Sepal.Length")
DominiqueMakowski commented 3 years ago

@laresbernardo what would be the insight's function that you'd like to use / that you'd consider a priority to immplement? Maybe you could give it a go and try adding support for one function (so that we have some sort of skeletton), and from there it would be easier for us to do the rest