Regression prediction | MATLAB realizes BiLSTM bidirectional long short-term memory neural network multi-input multi-output prediction

Regression prediction | MATLAB realizes BiLSTM bidirectional long short-term memory neural network multi-input multi-output prediction

predictive effect

insert image description here
insert image description here
insert image description here
insert image description here

basic introduction

MATLAB realizes BiLSTM bidirectional long-short-term memory neural network multi-input multi-output prediction. The data is multi-input multi-output prediction data. Input 10 features and output 3 variables. file, the operating environment MATLAB2018b and above. The command window outputs MAE and R2, and the data and program content can be obtained in the download area.

programming

%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
layers = [ ...
    sequenceInputLayer(numFeatures)
   
    fullyConnectedLayer(numResponses)
    regressionLayer];
options = trainingOptions('adam', ...
    'MaxEpochs',250, ...
    'GradientThreshold',1, ...
    'InitialLearnRate',0.005, ...
    'LearnRateSchedule','piecewise', ...
    'LearnRateDropPeriod',125, ...
    'LearnRateDropFactor',0.2, ...
    'ExecutionEnvironment','cpu', ...
    'Verbose',0, ...
    'Plots','training-progress');
%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   
net = trainNetwork(XTrain,YTrain,layers,options);
dataTestStandardized = (dataTest - mu) / sig;
XTest = dataTestStandardized(1:end-1);
net = predictAndUpdateState(net,XTrain);
[net,YPred] = predictAndUpdateState(net,YTrain(end));
numTimeStepsTest = numel(XTest);
%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Wonderful past

MATLAB realizes RBF radial basis neural network MIMO prediction
MATLAB realizes BP neural network MIMO prediction
MATLAB realizes DNN neural network MIMO prediction
MATLAB realizes GRNN generalized regression neural network MIMO prediction
MATLAB realizes GRU gating recurrent unit multiple input multiple output

References

[1] https://blog.csdn.net/kjm13182345320/article/details/116377961
[2] https://blog.csdn.net/kjm13182345320/article/details/127931217
[3] https://blog.csdn.net/kjm13182345320/article/details/127894261

Guess you like

Origin blog.csdn.net/kjm13182345320/article/details/132320914