Scoring H2O MOJO models with spark UDF and Scala

With H2O machine learning the best case is that your machine learning models can be exported as Java code so you can use them for scoring in any platform which supports Java. H2O algorithms generates POJO and MOJO models which does not require H2O runtime to score which is great for any enterprise. You can […]

Continue reading


Calculating Standard Deviation using custom UDF and group by in H2O

Here is the full code to calculate standard deviation using H2O group by method as well as using customer UDF: library(h2o) h2o.init() irisPath <- system.file(“extdata”, “iris_wheader.csv”, package = “h2o”) iris.hex <- h2o.uploadFile(path = irisPath, destination_frame = “iris.hex”) # Calculating Standard Deviation using h2o group by SdValue <- h2o.group_by(data = iris.hex, by = “class”, sd(“sepal_len”)) # […]

Continue reading


Calculate mean using UDF in H2O

Here is the full code to write a UDF to calculate mean for a given data frame using H2O machine learning platform:   library(h2o) h2o.init() ausPath <- system.file(“extdata”, “australia.csv”, package=”h2o”) australia.hex <- h2o.uploadFile(path = ausPath) # Writing the UDF myMeanUDF = function(Fr) { mean(Fr[, 1]) } # Applying UDF using ddply MeanValue = h2o.ddply(australia.hex[, c(“premax”, […]

Continue reading