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
println(my_dl_model)

To learn more about deep learning parameters list please visit:

http://docs.h2o.ai/h2o/latest-stable/h2o-algos/javadoc/hex/deeplearning/DeepLearningModel.DeepLearningParameters.html

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

http://blog.h2o.ai/2015/08/deep-learning-performance-august/

Keywords: Scala, Deep Learning, H2O

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s