I want to classify a set of time series supervised featured data with deep learning sequence to sequence method, the problem is when using lstm,what can I preset training option parameters having either maximum accuracy and avoid overfitting?
9 views (last 30 days)
Show older comments
options = trainingOptions('adam', ... 'MaxEpochs',maxEpochs, ... 'MiniBatchSize',miniBatchSize, ... 'GradientThreshold',1, ... 'InitialLearnRate',0.05, ... 'LearnRateSchedule','piecewise', ... 'L2Regularization',1e-3,... 'LearnRateDropPeriod',25, ... 'Verbose',0, ... 'Plots','training-progress');
net = trainNetwork(XTrain,YTrain,layers,options);
0 Comments
Answers (1)
Krishna
on 4 Nov 2024 at 18:57
Hi Mohammadreza,
I understand that you’re looking for ways to adjust the 'trainingOptions' to improve the accuracy of your LSTM classifier while preventing overfitting.
To achieve better accuracy, you might consider several strategies, such as increasing the training duration, using a more complex architecture like multiple layers of bi-LSTM, or training your network for a longer period by either reducing the mini-batch size or increasing the number of epochs. There isn’t a one-size-fits-all solution; you’ll need to conduct empirical analysis to determine what works best for your model.
To mitigate overfitting, you can increase the L2 regularization constant from the current e-03 value. Also consider expanding your training dataset. Adding more training data is usually beneficial, as it allows the model to become familiar with examples it hasn’t encountered during training, which can improve performance during inference.
In addition to these suggestions, I recommend reviewing existing research related to your problem statement and examining the training strategies they have implemented to maximize performance.
Please go through this example as well for sequence to sequence classfication presented in the MathWorks documentation,
Hope this helps.
0 Comments
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!