How do I weight input data when training a neural network?
23 views (last 30 days)
Hi, I have trained an LSTM neural network to classify ECG signals using data from several patients. I would now like to use this to classify a new patient's ECG signal as being normal or abnormal on a cycle-by-cycle basis. I would then like to add this labelled data to the input data for training the network. I then want to use this retrained network to classify that same patient's future ECG signal traces. Is there any way of weighting the new input data from this patient specifically so the classification network is more tuned for that patient specifically? Thanks in advance
Athul Prakash on 27 Jan 2021
I can think of a few ideas, you may need to experiment with these to find what works..
Once the network is trained on general data, you may try fine-tuning the network using the specific patient's data alone. This involves retraining the existing network on the patient's data, but using options that minimize how much the weights change. You may try to reduce the number of training iterations or the gradient step-size used or both.
The aim is to produce a network whose weights derive mostly from non-specific data, but has been customized particularly to be good at the select patient's data.
Alternatively, you could try the sample weighting technique. This involves giving additional weightage to some examples over others for calculating the loss function during training. There are many things you could try for this, such as modifying the architecture or writing a custom training script. The easiest way I can think of is to duplicate the patient's example multiple times in the training data itself and then train the network as normal. I would be cautious though, to avoid overfitting in the network.
Hope it helps!