title: How to get the labels of clusters after using autoencoder in R
body: <p>I'm a beginner in machine learning. I'm doing clustering using autoencoder in R (h2o package). For now, I've done the following codes:</p>
  
  <pre><code>`mydata = h2o.importFile(path = mfile)
  
  NN_model = h2o.deeplearning(
    x = 2:9,
    training_frame = mydata,
    hidden = c(2),
    epochs = 100,
    activation = "Tanh",
    autoencoder = TRUE
  )
  
  train_supervised_features = h2o.deepfeatures(NN_model, mydata, layer=1)`
  </code></pre>
  
  <p>For my data, there are not too many columns (as you can see in the codes, only 8 variables now), but lots of rows.</p>
  
  <p>Then I plot the 2 nodes in "train_supervised_features" obtained above. And I got the plot like this 
  It is clear that there are 8 clusters of my data (right?)<img src="https://i.stack.imgur.com/ipS1V.png" alt=""></p>
  
  <p>My question is, how can I extract the labels from the autoencoder results? I want to add the labels to original data, and plot in colors using these labels, something like this: <img src="https://i.stack.imgur.com/Jy8xS.png" alt=""></p>