Click the “Read More” button at the bottom or reply with the keyword “code” in the backend
to download the complete program + data + instruction manual
1. Introduction to the Program and Algorithm:
Basic Content:
-
This code is compiled on the Matlab platform, combining Convolutional Neural Network (CNN) with Bidirectional Long Short-Term Memory Neural Network (Bi-LSTM) for data regression prediction.
-
The training data includes 18 features and 1 response value, predicting 1 output value from 18 input values (multivariate, multi-input regression prediction).
-
Normalization of training data enhances the generalization of the network.
-
Features of the data are extracted through the CNN neural network, which are then input into the Bi-LSTM for regression prediction, improving the overall performance of the network.
-
Train the CNN-Bi_LSTM network with customizable parameters for easy modification.
-
During the iterative computation process, an optimization progress bar is automatically displayed to monitor the program’s running progress in real-time.
-
Automatically outputs various error evaluation metrics and a large number of experimental effect images.
Highlights and Advantages:
-
Detailed comments, with almost every key line explained, suitable for beginners to start learning.
-
Simply run the Main function to see all results, making it user-friendly.
-
Good programming habits, standardized main program, clear logic, and easy to read the code.
-
All data is input in Excel format, making data replacement easy, suitable for lazy users.
-
Rich, beautiful, and detailed output images for intuitive viewing of running effects.
-
Includes a detailed instruction document (see image below), covering algorithm principles and usage instructions.

2. Actual Running Effects:







3. Part of the Program:
clc;clear;warning off;%% Import DataData = table2array(readtable("dataset.xlsx"));% This example dataset contains:% 1. A total of 1800 samples (each row represents a sample)% 2. Each sample has 18 feature values (the first 18 columns represent the features, i.e., input variables)% 3. Each sample has 1 response value (the 19th column represents the response value, i.e., the predicted variable)%% Split Training and Testing SetsTemp = randperm(size(Data,1)); % Shuffle the data order to enhance model generalization.InPut_num = 1:1:18; % Number of input features, the first 18 columns in the data table are input values, so set to 1:1:18, if the first 5 are inputs, set to 1:1:5OutPut_num = 19; % Number of output responses, this example has only one response value, which is the 19th in the data table, if there are multiple response values, refer to the above data format to set x:1:y% Select the first 1700 samples as the training set and the last 100 samples as the testing set, i.e., (1:1700) and (1701:end)Train_InPut = Data(Temp(1:1700),InPut_num); % Training inputTrain_OutPut = Data(Temp(1:1700),OutPut_num); % Training outputTest_InPut = Data(Temp(1701:end),InPut_num); % Testing inputTest_OutPut = Data(Temp(1701:end),OutPut_num); % Testing outputclear Temp;%% Data Normalization% Normalize input feature data to between 0-1[~, Ps.Input] = mapminmax([Train_InPut;Test_InPut]',0,1); Train_InPut = mapminmax('apply',Train_InPut',Ps.Input);Test_InPut = mapminmax('apply',Test_InPut',Ps.Input);% Normalize output response data to between 0-1[~, Ps.Output] = mapminmax([Train_OutPut;Test_OutPut]',0,1);Train_OutPut = mapminmax('apply',Train_OutPut',Ps.Output);Test_OutPut = mapminmax('apply',Test_OutPut',Ps.Output);Temp_TrI = cell(size(Train_InPut,2),1);Temp_TrO = cell(size(Train_OutPut,2),1);Temp_TeI = cell(size(Test_InPut,2),1);Temp_TeO = cell(size(Test_OutPut,2),1);% Convert to cell formatfor i = 1:size(Train_InPut,2) Temp_TrI{i} = Train_InPut(:,i); Temp_TrO{i} = Train_OutPut(:,i);endTrain_InPut = Temp_TrI;Train_OutPut = Temp_TrO;for i = 1:size(Test_InPut,2) Temp_TeI{i} = Test_InPut(:,i); Temp_TeO{i} = Test_OutPut(:,i);endTest_InPut = Temp_TeI;Test_OutPut = Temp_TeO;clear Temp_TrI Temp_TrO Temp_TeI Temp_TeO;
4. Complete Program Download:
