Autoencoders are unsupervised learning methods on neural networks. We'll see more of this in Chapter 7, Use Cases of Neural Networks – Advanced Topics. h2o
can be used to detect an anomaly by using deep autoencoders. To train such a model, the same function, h2o.deeplearning()
, is used, with some changes in the parameters:
anomaly_model <- h2o.deeplearning(1:4, training_frame = as.h2o(iris), activation = "Tanh", autoencoder = TRUE, hidden = c(50,20,50), sparse = TRUE, l1 = 1e-4, epochs = 100)
The autoencoder=TRUE
sets the deeplearning
method to use the autoencoder technique unsupervised learning method. We are using only the training data, without the test set and the labels. The fact that we need a deep autoencoder
instead of...