2
$\begingroup$

I have implemented a deep neural network which performs the classification task and obtained accuracy for each epoch as follows

enter image description here

In graph, X-axis is number of epochs and Y-axis is accuracy obtained

According to graph highest accuracy obtained is 90%, lowest is 0% and average is nearly 40% But now what will be the overall performance(accuracy) of the model

How to choose best hyper parameters according to the performance of the model

$\endgroup$

1 Answer 1

1
$\begingroup$

Plotting error/accuracy against number of epochs is a way to see how fast is your neural network approaching a minima. Usually, one would observe a low accuracy for a small number of epochs. With an increasing number of epochs, accuracy should increase. Hence, your plot is rather weird! Are you sure it's correct?

But now what will be the overall performance(accuracy) of the model?

To estimate accuracy you should be looking at the performance for a high number of epochs. Moreover, you need to split your data into a train and test set and have an idea of whether your model suffers from under-/overfitting.

How to choose best hyper parameters according to the performance of the model?

Split your data into train and test set. Compute training and test error/accuracy and see whether your model suffers from under- and/or overfitting. Based on such diagnosis change some of the hyperparameters accordingly. In particular, when your model is underfitting you can try bigger networks, bigger hidden layers, or run the optimisation for more iterations. If your model suffers from overfitting you can try regularisation. Hyperparamter tuning is a topic in itself. There is a vast amount of literature on this. I would suggest Andrew NG's courses on Machine Learning for detailed info.

$\endgroup$
2
  • $\begingroup$ you mean increasing number of epochs always increases accuracy $\endgroup$ Commented Jul 8, 2020 at 9:46
  • $\begingroup$ Well, yes. If everything is going alright you should observe an increasing accuracy with an increasing number of epochs. However, the smoothness of the accuracy-number of epochs curve is related to the optimisation method you are using. If you are using gradient descent (update weights after passing the whole dataset) the improved accuracy should be smooth. If you use batch gradient descent accuracy should also increase but in a less smooth manner. In general, the higher the batch size is, the smoother the curve. $\endgroup$
    – Saleh
    Commented Jul 8, 2020 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.