This repository consists of different classification models trained on the Fassion Mnist data set.
The images and labels used to train all the models in the repositary was loaded directly from KERAS using the below command
# To load data
(x_train,y_train),(x_test,y_test) = tf.keras.datasets.fassion_mnist.load_data()
The train data has 60000 samples and the test data has 10000 samples which sums up to a total of 70000 samples. Each image has a resolution of 28X28 which gives us 784 pixels when flattened.
There are a total number of 10 classes of images and every image has its label.
Four machine_learning models and three deep_learning models were trained out of which the simple artificial nural network named ANN1 gave the best results. Below are the resuls of different models.
MODEL_NAME | ACCURACY | CODE | To view confusion matrix |
---|---|---|---|
ANN1 | 0.9758999943733215 | 🔗 | - |
CNN2 | 0.9008 | 🔗 | - |
CNN1 | 0.8882 | 🔗 | - |
Random_Forest | 0.88 | 🔗 | 🔗 |
K_Nearest_Neighbor | 0.86 | 🔗 | 🔗 |
Support_Vector_Machines | 0.8402 | 🔗 | 🔗 |
The ANN1 model is a simple ANN with only one hidden layer which uses RELU as its activation function and the hidden layer uses SOFTMAX as this is a classification problem. the model takes in a input of 784 pixels and gives a output of 10 probabilities threfore the hidden layer follows the rule {(2/3 * input) + output} which gives 532 outputs from the hidden layer. The model gives a surprisingly good accuracy of 97% in the test data.