Functional Programming and Intelligent Algorithms

Early stopping

Week 9:

1 Early stopping

At this point, the priority is to complete exercises implementing and using the neural network.

If you have time, the following exercises can give practice on the techniques from today’s lecture.

In this exercise, we will implement Early stopping method to avoid overfitting.

1.1 Split the data

In this technique, you need to divide the available data three subsets: training, validation and test set. Write a function that randomly splits your data into 3 subsets.

If you need a hint, come back to Tutorial 4.1 and take a look at mkTestTrainSets. What you need to do is pretty much similar.

1.2 Monitor the error on the validation set

Modify function trainNetwork to monitor the error on the validation set during training process. The process should stop when the validation error increases.


7th April 2017
Que Tran / qutr@ntnu.no