分类预测 | Matlab特征分类预测全家桶(BP/SVM/ELM/RF/LSTM/BiLSTM/GRU/CNN)
输入多个特征,可用于二分类及多分类模型,可视化展示分类准确率。
运行环境Matlab2020及以上。
完整程序和数据下载:私信博主回复Matlab特征分类预测全家桶(BP/SVM/ELM/RF/LSTM/BiLSTM/GRU/CNN)
程序设计
%% lstm
%输入层设、学习层、全连接层
layers = [ ...
sequenceInputLayer(inputSize)
fullyConnectedLayer(outputSize)
regressionLayer];
%% trainoption(lstm)
%优化算法、训练次数、梯度阈值、运行环境、学习率、学习计划
opts = trainingOptions('adam', ...
'MaxEpochs',800, ...
'MiniBatchSize',48,...
'GradientThreshold',1,...
'ExecutionEnvironment','gpu',...
'InitialLearnRate',0.005, ...
'LearnRateSchedule','piecewise', ...
'LearnRateDropPeriod',100, ...
'LearnRateDropFactor',0.8, ...
'Verbose',0, ...
'Plots','training-progress'...
);
[1] https://blog.csdn.net/kjm13182345320/article/details/120498871?spm=1001.2014.3001.5501
[2] https://blog.csdn.net/kjm13182345320/article/details/120525662?spm=1001.2014.3001.5501
[3] https://blog.csdn.net/kjm13182345320/article/details/120406657?spm=1001.2014.3001.5501
[4] https://mianbaoduo.com/o/bread/mbd-YZyblpxy