시작하기무료로 시작하기

Modeling with h2o

In the last exercise, you successfully prepared data for modeling with h2o. Now, you can use this data to train a model. The h2o library has already been loaded for you, as has the seeds_train_data object and the following code has been run:

h2o.init()
seeds_train_data_hf <- as.h2o(seeds_train_data)

y <- "seed_type"
x <- setdiff(colnames(seeds_train_data_hf), y)

seeds_train_data_hf[, y] <- as.factor(seeds_train_data_hf[, y])

sframe <- h2o.splitFrame(seeds_train_data_hf, seed = 42)
train <- sframe[[1]]
valid <- sframe[[2]]

이 연습은 강의의 일부입니다

Hyperparameter Tuning in R

강의 보기

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Train random forest model
rf_model <- ___(___ = x,
                ___ = y,
                ___ = train,
                ___ = valid)
코드 편집 및 실행