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 次查看(过去 30 天)
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);

回答(1 个)

Krishna
Krishna 2024-11-4,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.

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by