Search code examples
rh2omlr

Error: could not find function "makeLearner" using h2o package


I'm using h2o package and trying to create a learner using the below given code

install.packages("h2o")
library("h2o")
h2o.learner <- makeLearner("regr.h2o.deeplearning",predict.type = "response")

But I'm getting this error

> h2o.learner <- makeLearner("regr.h2o.deeplearning",predict.type = "response")
Error: could not find function "makeLearner"

Note: Few months back I used this code without any problem.

Any idea what could be possible thing for this error?


Solution

  • The correct code for this is simply

    library(mlr)
    h2o.learner = makeLearner("regr.h2o.deeplearning")