Open erzk opened 4 years ago
Hi, Thanks for the note, The code chunk update as following
# Example using h2o
x <- c("Year_Sold", "Longitude", "Latitude")
y <- "Sale_Price"
h2o.cv <- h2o.glm(
x = x,
y = y,
training_frame = ames.h2o,
nfolds = 10 # perform 10-fold CV
)
that worked for me.
Version: Online ebook (2020-02-01)
I.2.4.1 k-fold cross validation
The code below fails as
x
andy
were not defined before calling the functionThis code snippet called earlier includes
x
andy
provided within a functionSolutions:
x
andy
externally and pass them to these functions.OR
y
.features
is the same asx
defined above. Usefeatures
instead ofx
.