Please note that when training using mllearn API (i.e. model.fit(X_df)), SystemML
expects that labels have been converted to 1-based value.
This avoids unnecessary decoding overhead for large dataset if the label columns has already been decoded.
For scikit-learn API, there is no such requirement.

Training Lenet on the MNIST dataset

frommlxtend.dataimportmnist_dataimportnumpyasnpfromsklearn.utilsimportshuffle# Download the MNIST datasetX,y=mnist_data()X,y=shuffle(X,y)# Split the data into training and testn_samples=len(X)X_train=X[:int(.9*n_samples)]y_train=y[:int(.9*n_samples)]X_test=X[int(.9*n_samples):]y_test=y[int(.9*n_samples):]