AIN 311 MACHINE LEARNING BLOG 6— MLP MODEL

Aliyigit
AIN311 Fall 2023 Projects
2 min readJan 2, 2024

This week, we prepared our MLP model. In our CNN models and KNN model, we had achieved the target accuracy of 70%. In our MLP model, we are reaching the targeted accuracy as well. Now, let me provide you with a bit more detail about our MLP model.

PARAMETERS FOR MLP MODEL

We conducted numerous trials to select the most accurate parameters for our MLP model, but ultimately, we believe we have found the MLP model that yields the best results. There are many parameters to consider, such as the number of layers, the sizes of layers, and the activation functions for each layer. Therefore, it is best to show you the parameters we have decided to use in our project in a table.

PARAMETERS FOR MLP MODEL

We created a ‘checkpoint’ to save the best model, and the parameters we provided for the checkpoint are as follows:

  • Model Name: MLP_model
  • Monitor: ‘val_accuracy’ (which metric to look at)
  • Save Best Only: True (indicating to save only the best value)
  • Mode: ‘max’ (indicating to consider the maximum val_accuracy value)
  • Verbose: 1 (indicating to show some progress)

TEST AND TRAIN FOR MLP MODEL

After multiple adjustments during the training phase of our MLP model, we concluded that we achieved the best results with a batch_size of 72 and epoch of 200. After training our MLP model, we printed the results to select the best model.

Epoch And Accuracy Compare for MLP Model

Using the model we saved based on the best validation value, we calculated the accuracy for the test data. The accuracy value for the test data of our MLP model was 0.72. We have achieved our target value of 0.70. To examine the predictions made by our MLP model in more detail, we created a confusion matrix.

Confusion Matrix for MLP Model

CONCLUSION

We believe that we have achieved quite good results. In this period where we are starting to forget the seasons due to issues such as global warming, we all should fulfill our responsibilities to leave a better world for future generations. One of the simplest things we can do for this is recycling.

--

--