How do I weight input data when training a neural network?
18 次查看(过去 30 天)
显示 更早的评论
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
2 个评论
Athul Prakash
2021-1-22
Do you mean to weigh this data specifically for one round of prediction? Or to change the trained network itself, which would affect all predictions with that network?
Any info on what kind of data you've trained on vs predicting on would help.
回答(1 个)
Athul Prakash
2021-1-27
Hi Cai,
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 ECG / EKG 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!