T# Install H2O if needed if (!require(h2o)) { install.packages(“h2o”) library(h2o) } else { library(h2o) } # Initialize H2O h2o.init()

Load example dataset

data(iris)

head(iris)

Convert data frame to H2O frame

iris_h2o <- as.h2o(iris)

iris_h2o

Define response and predictors

y <- “Species” x <- setdiff(names(iris_h2o), y)

Train a simple GLM model

model <- h2o.glm( x = x, y = y, training_frame = iris_h2o, family = “multinomial” )

model

Make predictions

predictions <- h2o.predict(model, iris_h2o)

head(predictions)

Model performance

performance <- h2o.performance(model)

performance

Final Comments

This activity introduced me to the H2O framework and showed how machine learning models can be built quickly using R. By initializing the H2O cluster, converting data into H2O frames, training a model, and generating predictions, I was able to understand the basic workflow of H2O. This exercise helped me see how H2O simplifies the process of building scalable machine learning models.