August 2017
Intermediate to advanced
288 pages
8h 6m
English
The section will demonstrate steps to build the GLM model using H2O.
# Load the occupancy data occupancy_train <-read.csv("C:/occupation_detection/datatraining.txt",stringsAsFactors = T)occupancy_test <- read.csv("C:/occupation_detection/datatest.txt",stringsAsFactors = T)
# Define input (x) and output (y) variables"x = c("Temperature", "Humidity", "Light", "CO2", "HumidityRatio")y = "Occupancy"
# Convert the outcome variable into factoroccupancy_train$Occupancy <- as.factor(occupancy_train$Occupancy) ...