Zalando’s images classification using H2O with R

Fashion-MNIST

About three weeks ago the Fashion-MNIST dataset of Zalando’s article images, which is a great replacement of classical MNIST dataset, was released. In the following article we will try to build a strong classifier using H2O and R.

Each example is a 28×28 grayscale image, associated with a label from 10 classes:

Next we will import data into H2O using h2o.importFile() function, in which we can specify column types and column names if needed. If you want to send data into H2O directly from R, you can use as.h2o() function

If we set export_weights_and_biases parameter to TRUE networks weights and biases will be saved and we can retrieve them using h2o.weights() and h2o.biases() functions. Thanks to this we can try to visualize neurons from the hidden layer (Note that we set ignore_const_cols to FALSE to get weights for every pixel).

Accuracy 0.916 is a lot better result, but there’s sitll a lot of thing we can do to improve our model. In the future we can consider using a grid or random search to find best hyperparameters or use same ensemble methods to get better results.