Deep Learning with H2O in Scala

What is H2O? Click here

How to perform Deep Learning in H2O? Click here

Here is the code snippet to show how to write deep learning code in Scala using H2O:

import _root_.hex.deeplearning.DeepLearning
import _root_.hex.deeplearning.DeepLearningModel.DeepLearningParameters
val dlParams = new DeepLearningParameters()
dlParams._response_column = "RESPONSE"
dlParams._keep_cross_validation_predictions = true
dlParams._train = trainFrame
dlParams._valid = validFrame
dlParams._nfolds = 5
dlParams._hidden = Array(2,2)
val my_dl = new DeepLearning(dlParams, Key.make("my_dl_model.hex"))
val my_dl_model = my_dl.trainModel.get

To learn more about deep learning parameters list please visit:

To learn more about fine tuning deep learning parameters please visit:

Keywords: Scala, Deep Learning, H2O


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s