Grid_constructors: Creating Grid S4 Object

Grid-classR Documentation

Creating Grid S4 Object

Description

constructors for Grid S4 object

Usage

create_Grid.H2OGrid(obj)

create_Grid.H2OAutoML(obj)

create_Grid.Grid(obj)

create_Grid(obj)

Arguments

obj

A H2OGrid or H2OAutoML object.

Details

Creates Grid S4 object from a H2OGrid or H2OAutoML object. This object is used as the grid element in a nano object. The Grid object holds useful information about the input object which will be used by other functions.

Value

a Grid S4 object.

Examples

## Not run: 
if(interactive()){
 library(h2o)
 library(nano)
 
 h2o.init()
 
 # import dataset
 data(property_prices)
 train <- as.h2o(property_prices)
 
 # set the response and predictors
 response <- "sale_price"
 var <- setdiff(colnames(property_prices), response)
 
 # build grids
 grid_1 <- h2o.grid(x               = var,
                    y               = response,
                    training_frame  = train,
                    algorithm       = "randomForest",
                    hyper_params    = list(ntrees = 1:2),
                    nfolds          = 3,
                    seed            = 628)
                    
 Grid_1 <- create_Grid(grid_1)

 }

## End(Not run)

Nanoputian628/nano documentation built on Oct. 30, 2023, 3:28 p.m.