Skip to Content
R Deep Learning Cookbook
book

R Deep Learning Cookbook

by PKS Prakash, Achyutuni Sri Krishna Rao
August 2017
Intermediate to advanced
288 pages
8h 6m
English
Packt Publishing
Content preview from R Deep Learning Cookbook

How to do it...

The section will focus on optimizing hyper parameters in H2O using grid searches.

  1. In our case, we will optimize for the activation function, the number of hidden layers (along with the number of neurons in each layer), epochs, and regularization lambda (l1 and l2):
# Perform hyper parameter tuningactivation_opt <- c("Rectifier","RectifierWithDropout", "Maxout","MaxoutWithDropout")hidden_opt <- list(5, c(5,5))epoch_opt <- c(10,50,100)l1_opt <- c(0,1e-3,1e-4)l2_opt <- c(0,1e-3,1e-4)hyper_params <- list(activation = activation_opt,                     hidden = hidden_opt,                     epochs = epoch_opt,                     l1 = l1_opt,                     l2 = l2_opt)
  1. The following search criteria have been set to perform a grid search. Adding to the following list, one can also specify the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Deep Learning with R Cookbook

Deep Learning with R Cookbook

Swarna Gupta, Rehan Ali Ansari, Dipayan Sarkar
The Deep Learning with Keras Workshop

The Deep Learning with Keras Workshop

Matthew Moocarme, Mahla Abdolahnejad, Ritesh Bhagwat
Deep Learning for Chest Radiographs

Deep Learning for Chest Radiographs

Yashvi Chandola, Jitendra Virmani, H.S Bhadauria, Papendra Kumar

Publisher Resources

ISBN: 9781787121089Supplemental Content