Regression prediction | MATLAB implements POA-CNN-BiLSTM pelican algorithm to optimize convolutional bidirectional long-term short-term memory neural network multi-input single-output regression prediction

Regression prediction | MATLAB implements POA-CNN-BiLSTM pelican algorithm to optimize convolutional bidirectional long-term short-term memory neural network multi-input single-output regression prediction

predictive effect

1
2
3

4
5
6
7
8
9

basic introduction

MATLAB implements POA-CNN-BiLSTM Pelican algorithm to optimize convolutional bidirectional long-term short-term memory neural network multiple-input single-output regression prediction (complete source code and data) 1. MATLAB
implements POA-CNN-BiLSTM Pelican algorithm to optimize convolutional bidirectional long-term short-term memory Neural network multi-input single-output regression prediction (complete source code and data)
2. Input multiple features, output a single variable, multi-input single-output regression prediction;
3. Multi-indicator evaluation, evaluation indicators include: R2, MAE, MSE, RMSE, etc. , the code quality is extremely high;
4. The optimization parameters of the snake swarm algorithm are: learning rate, hidden layer nodes, and regularization parameters;
5. Excel data, easy to replace, and the operating environment is 2020 and above.

Model description

POA-CNN-BiLSTM Pelican Algorithm is a neural network model for regression prediction, which combines a convolutional neural network (CNN), a bidirectional long-term short-term memory neural network (BiLSTM) and a multi-input single-output architecture.
In this model, a convolutional neural network is used to extract features from input data, a bidirectional long-short-term memory neural network is used to process sequence data, and a multi-input single-output architecture can simultaneously process multiple input variables and output a prediction result. The "pelican" in the model's name refers to a migratory bird, probably because the model can handle multiple input variables, just as migratory birds can fly and float.
The method of optimizing this model can include the following aspects:
Data preprocessing: Preprocessing the input data can improve the performance of the model. Data normalization, standardization, or feature selection and dimensionality reduction can be performed to reduce the dimension and noise of the input data, so as to extract features better.
Hyperparameter Tuning: Choosing the right hyperparameters can improve the performance of the model.
Regularization: Using regularization techniques can reduce the overfitting of the model. Techniques such as L1, L2 regularization, dropout, etc. can be used to avoid the model from overfitting the training data.
To sum up, optimizing the POA-CNN-BiLSTM Pelican algorithm can be carried out through a variety of methods, and the combination of these methods can improve the performance and generalization ability of the model, so as to better predict the regression results.

6

Deep learning network structure based on convolutional neural network and bidirectional long short-term memory (BiLSTM) neural network. Using the method of feature fusion, the shallow features and deep features are extracted and connected through the convolutional network, the features are fused through convolution, and the obtained vector information is input into the BiLSTM unit.

programming

%%  获取最优种群
   for j = 1 : SearchAgents
       if(fitness_new(j) < GBestF)
          GBestF = fitness_new(j);
          GBestX = X_new(j, :);
       end
   end
   
%%  更新种群和适应度值
   pop_new = X_new;
   fitness = fitness_new;

%%  更新种群 
   [fitness, index] = sort(fitness);
   for j = 1 : SearchAgents
      pop_new(j, :) = pop_new(index(j), :);
   end

%%  得到优化曲线
   curve(i) = GBestF;
   avcurve(i) = sum(curve) / length(curve);
end

%%  得到最优值
Best_pos = GBestX;
Best_score = curve(end);

%%  得到最优参数
NumOfUnits       =abs(round( Best_pos(1,3)));       % 最佳神经元个数
InitialLearnRate =  Best_pos(1,2) ;% 最佳初始学习率
L2Regularization = Best_pos(1,1); % 最佳L2正则化系数
% 
inputSize = k;
outputSize = 1;  %数据输出y的维度  
%  参数设置
opts = trainingOptions('adam', ...                    % 优化算法Adam
    'MaxEpochs', 20, ...                              % 最大训练次数
    'GradientThreshold', 1, ...                       % 梯度阈值
    'InitialLearnRate', InitialLearnRate, ...         % 初始学习率
    'LearnRateSchedule', 'piecewise', ...             % 学习率调整
    'LearnRateDropPeriod', 6, ...                     % 训练次后开始调整学习率
    'LearnRateDropFactor',0.2, ...                    % 学习率调整因子
    'L2Regularization', L2Regularization, ...         % 正则化参数
    'ExecutionEnvironment', 'gpu',...                 % 训练环境
    'Verbose', 0, ...                                 % 关闭优化过程
    'SequenceLength',1,...
    'MiniBatchSize',10,...
    'Plots', 'training-progress');                    % 画出曲线

References

[1] https://blog.csdn.net/kjm13182345320/article/details/128577926?spm=1001.2014.3001.5501
[2] https://blog.csdn.net/kjm13182345320/article/details/128573597?spm=1001.2014.3001.5501

Guess you like

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